Skip to content

feat(spanner): support timeout, retry policy and backoff policy for streaming RPCs#5516

Open
olavloite wants to merge 6 commits intogoogleapis:mainfrom
olavloite:spanner-statement-request-options-for-streaming
Open

feat(spanner): support timeout, retry policy and backoff policy for streaming RPCs#5516
olavloite wants to merge 6 commits intogoogleapis:mainfrom
olavloite:spanner-statement-request-options-for-streaming

Conversation

@olavloite
Copy link
Copy Markdown
Contributor

@olavloite olavloite commented Apr 24, 2026

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.
…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.
@olavloite olavloite requested review from a team as code owners April 24, 2026 09:46
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 97.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.76%. Comparing base (9f194b9) to head (dc297ec).

Files with missing lines Patch % Lines
src/spanner/src/result_set.rs 97.29% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #5516    +/-   ##
========================================
  Coverage   97.75%   97.76%            
========================================
  Files         218      218            
  Lines       49498    49638   +140     
========================================
+ Hits        48389    48527   +138     
- Misses       1109     1111     +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant