-
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 isolation level option for disabling internal retries (#327)
Internal retries of aborted transactions is enabled by default for database/sql connections for Spanner. However, when an application or framework knows that it will retry the transaction using a retry-loop, it is more efficient to disable internal retries. Some frameworks, such as gorm, however make this hard to achieve, as they only allow TxOptions to be used to configure the transaction, and do not give access to the underlying driver or connection. This change adds a custom isolation level that can be used to disable internal retries of aborted transactions.
- Loading branch information
Showing
2 changed files
with
96 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