Skip to content

Commit c2d5614

Browse files
authored
chore: reset default to platform thread (#3551)
Reset the default to using a platform thread for connections. This was the default before adding an option for setting the executor type, and the new default is causing problems with the async Connection API. Fixes #3541
1 parent 6235f0f commit c2d5614

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static UnitOfWorkType of(TransactionMode transactionMode) {
292292
statementExecutorType =
293293
options.isUseVirtualThreads()
294294
? StatementExecutorType.VIRTUAL_THREAD
295-
: StatementExecutorType.DIRECT_EXECUTOR;
295+
: StatementExecutorType.PLATFORM_THREAD;
296296
}
297297
this.statementExecutor =
298298
new StatementExecutor(statementExecutorType, options.getStatementExecutionInterceptors());
@@ -342,7 +342,7 @@ && getDialect() == Dialect.POSTGRESQL
342342
new StatementExecutor(
343343
options.isUseVirtualThreads()
344344
? StatementExecutorType.VIRTUAL_THREAD
345-
: StatementExecutorType.DIRECT_EXECUTOR,
345+
: StatementExecutorType.PLATFORM_THREAD,
346346
Collections.emptyList());
347347
this.spannerPool = Preconditions.checkNotNull(spannerPool);
348348
this.options = Preconditions.checkNotNull(options);

0 commit comments

Comments
 (0)