-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spanner: Handle AbortedExceptions that occur before commit (#4181)
* spanner: Handle AbortedExceptions that occur before commit The current TransactionRunner code checks for aborted transactions by using the isAborted() function. This function returns the value of "aborted" that is only set when processing resultSets. This does not work for DML which only uses the resultSet stats and does not actually call ResultSet.next(). This patch adds an additional check for the aborted exception type and retries such transactions. * throw before executeUpdate, verify flag is false after test * Update google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java Co-Authored-By: nithinsujir <118742+nithinsujir@users.noreply.github.com>
- Loading branch information
1 parent
97b1efc
commit 90f8c98
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters