Skip to content

Commit f2e3d20

Browse files
authored
chore: reset default to platform thread (googleapis#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 googleapis#3541
1 parent 1611c0c commit f2e3d20

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

Lines changed: 2 additions & 2 deletions
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)