File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1925,16 +1925,17 @@ private Transaction beginTransaction(
19251925 }
19261926 Transaction transaction = builder .build ();
19271927 transactions .put (transaction .getId (), transaction );
1928- // Do not add transaction id to transactionsStarted if this request was from background thread
1928+ // TODO: remove once UNIMPLEMENTED error is not thrown for read-write mux
1929+ // Do not consider the transaction if this request was from background thread
19291930 if (requestOptions == null
19301931 || !requestOptions .getTransactionTag ().equals ("multiplexed-rw-background-begin-txn" )) {
19311932 transactionsStarted .add (transaction .getId ());
1933+ if (abortNextTransaction .getAndSet (false )) {
1934+ markAbortedTransaction (transaction .getId ());
1935+ }
19321936 }
19331937 isPartitionedDmlTransaction .put (
19341938 transaction .getId (), options .getModeCase () == ModeCase .PARTITIONED_DML );
1935- if (abortNextTransaction .getAndSet (false )) {
1936- markAbortedTransaction (transaction .getId ());
1937- }
19381939 return transaction ;
19391940 }
19401941
You can’t perform that action at this time.
0 commit comments