Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 6c14374

Browse files
authored
Merge 7711420 into 61ea2b9
2 parents 61ea2b9 + 7711420 commit 6c14374

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,10 @@ TransactionSelector getTransactionSelector() {
463463
// Aborted error if the call that included the BeginTransaction option fails. The
464464
// Aborted error will cause the entire transaction to be retried, and the retry will use
465465
// a separate BeginTransaction RPC.
466-
TransactionSelector.newBuilder()
466+
// If tx.get() returns successfully, this.transactionId will also have been set to a
467+
// valid value as the latter is always set when a transaction id is returned by a
468+
// statement.
469+
return TransactionSelector.newBuilder()
467470
.setId(tx.get(waitForTransactionTimeoutMillis, TimeUnit.MILLISECONDS))
468471
.build();
469472
}

0 commit comments

Comments
 (0)