-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add transaction runner for better transaction retries (#315)
* feat: add transaction runner for better transaction retries Adds a RunTransaction function that executes read/write transactions in a retry loop, and automatically retries the transaction if it was aborted by Spanner. This prevents ErrAbortedDueToConcurrentModification from being returned. Using this function requires the transaction to be passed as a function argument instead of using the traditional model of calling Begin and Commit on a connection. * test: add a test for errors during commit
- Loading branch information
Showing
5 changed files
with
621 additions
and
21 deletions.
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
Oops, something went wrong.