feat(spanner): support transaction timeout#5518
Open
olavloite wants to merge 10 commits intogoogleapis:mainfrom
Open
feat(spanner): support transaction timeout#5518olavloite wants to merge 10 commits intogoogleapis:mainfrom
olavloite wants to merge 10 commits intogoogleapis:mainfrom
Conversation
Adds support for setting a timeout, retry policy, and backoff policy per statement and read. This allows an application to override the defaults for these options on a per statement-basis. Note: This change adds the API for all types of statements. However, the retry and backoff policies are not respected for the streaming RPCs ExecuteStreamingSql and StreamingRead yet. This will be added in a follow-up pull request.
…treaming RPCs Add support for custom timeouts, retry policies, and backoff policies for streaming RPCs that return a ResultSet. This also refactors ResultSet to store its internal defaults as a RetryPolicy and BackoffPolicy, instead of hardcoded custom values.
Adds support for setting a timeout, retry policy, and backoff policy per statement and read. This allows an application to override the defaults for these options on a per statement-basis. Note: This change adds the API for all types of statements. However, the retry and backoff policies are not respected for the streaming RPCs ExecuteStreamingSql and StreamingRead yet. This will be added in a follow-up pull request.
…nt-request-options-for-streaming
Adds support for setting an attempt timeout and a retry- and backoff policy for a partition in a BatchReadOnlyTransaction. These settings are not serialized, which means that any host that wants to apply any of these settings to its execution of a partition must set these explicitly.
Adds support for setting a total timeout for a transaction. The timeout is applied to each RPC in the transaction, and 'ticks down' as time passes. If the transaction does not finish within the total timeout, it will fail with a DEADLINE_EXCEEDED error. Note that the timeout is NOT applied to the Rollback RPC, to allow a TransactionRunner or an application to rollback the transaction after a timeout error.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5518 +/- ##
==========================================
- Coverage 97.75% 97.71% -0.05%
==========================================
Files 218 218
Lines 49498 49971 +473
==========================================
+ Hits 48389 48829 +440
- Misses 1109 1142 +33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…panner-statement-request-options-for-partitions
…spanner-transaction-timeout
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for setting a total timeout for a transaction. The timeout is applied to
each RPC in the transaction, and 'ticks down' as time passes. If the transaction does
not finish within the total timeout, it will fail with a DEADLINE_EXCEEDED error.
Note that the timeout is NOT applied to the Rollback RPC, to allow a TransactionRunner
or an application to rollback the transaction after a timeout error.
Depends on #5517