Skip to content

Commit 57b536a

Browse files
authored
chore: rename system property for core threads for Async API (#2657)
Rename the System property that is used to set the number of core threads for the Async API to a namespaced name to be consistent with other System properties. The name name is com.google.cloud.spanner.async_num_core_threads.
1 parent 63bcbea commit 57b536a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ static CloseableExecutorProvider createDefaultAsyncExecutorProvider() {
530530

531531
@VisibleForTesting
532532
static int getDefaultAsyncExecutorProviderCoreThreadCount() {
533-
String propertyName = "SPANNER_ASYNC_NUM_CORE_THREADS";
533+
String propertyName = "com.google.cloud.spanner.async_num_core_threads";
534534
String propertyValue = System.getProperty(propertyName, "8");
535535
try {
536536
int corePoolSize = Integer.parseInt(propertyValue);

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ public void testCustomAsyncExecutorProvider() {
917917
@Test
918918
public void testAsyncExecutorProviderCoreThreadCount() throws Exception {
919919
assertEquals(8, SpannerOptions.getDefaultAsyncExecutorProviderCoreThreadCount());
920-
String propertyName = "SPANNER_ASYNC_NUM_CORE_THREADS";
920+
String propertyName = "com.google.cloud.spanner.async_num_core_threads";
921921
assertEquals(
922922
Integer.valueOf(8),
923923
runWithSystemProperty(

0 commit comments

Comments
 (0)