Skip to content

Commit

Permalink
chore: reset default to platform thread (googleapis#3551)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
olavloite authored and surbhigarg92 committed Dec 26, 2024
1 parent cbd050f commit 3662b56
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static UnitOfWorkType of(TransactionMode transactionMode) {
statementExecutorType =
options.isUseVirtualThreads()
? StatementExecutorType.VIRTUAL_THREAD
: StatementExecutorType.DIRECT_EXECUTOR;
: StatementExecutorType.PLATFORM_THREAD;
}
this.statementExecutor =
new StatementExecutor(statementExecutorType, options.getStatementExecutionInterceptors());
Expand Down Expand Up @@ -342,7 +342,7 @@ && getDialect() == Dialect.POSTGRESQL
new StatementExecutor(
options.isUseVirtualThreads()
? StatementExecutorType.VIRTUAL_THREAD
: StatementExecutorType.DIRECT_EXECUTOR,
: StatementExecutorType.PLATFORM_THREAD,
Collections.emptyList());
this.spannerPool = Preconditions.checkNotNull(spannerPool);
this.options = Preconditions.checkNotNull(options);
Expand Down

0 comments on commit 3662b56

Please sign in to comment.