-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spanner: Retry "Session not found" for read-only transactions
Session not found errors should be retried by taking a new session from the pool and retrying the gRPC call when that is possible. This change fixes this for multi-use read-only transactions when the error occurs on the BeginTransaction call. This method can safely be retried on a new session, as the user has not yet been able to execute any queries on the transaction yet. This is also the most probable moment for a Session not found error to occur for a multi-use read-only transaction. A Session not found error halfway through a read-only multi use transaction could in theory be mitigated by starting a new read-only transaction on a new session with the same read timestamp as the transaction that produced the error, retry the query that returned the error on the new transaction and update the internal transaction reference to ensure any future queries that the user executes on the transaction will use the new transaction. This is not included in this change. Updates #1527. Change-Id: Ibc48e558bf07e8066996c6aaad864c4450abae66 Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/44051 Reviewed-by: kokoro <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
- Loading branch information
Showing
4 changed files
with
98 additions
and
57 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
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