fix(bigtable): Added rst_stream exception handling for ReadRows. - #18197
Open
daniel-sanche wants to merge 3 commits into
Open
fix(bigtable): Added rst_stream exception handling for ReadRows.#18197daniel-sanche wants to merge 3 commits into
daniel-sanche wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a custom retry predicate, _rst_stream_aware_predicate, for ReadRows operations in both the asynchronous and synchronous Bigtable clients. This predicate treats specific InternalServerError messages (such as "rst_stream") as ServiceUnavailable errors to allow them to be retried. The review feedback points out a potential AttributeError in the predicate's implementation if e.message is None, and suggests adding a type check to ensure e.message is a string before calling .lower().
daniel-sanche
force-pushed
the
shim/10-read-rows-rst-stream
branch
from
September 2, 2026 18:42
dd45c75 to
6348bb9
Compare
daniel-sanche
force-pushed
the
shim/10-read-rows-rst-stream
branch
from
September 2, 2026 19:22
6348bb9 to
bdd2d76
Compare
daniel-sanche
marked this pull request as ready for review
September 2, 2026 19:28
daniel-sanche
force-pushed
the
shim/10-read-rows-rst-stream
branch
from
September 2, 2026 19:58
c66eaf1 to
560d5b8
Compare
According to go/rst_stream, `INTERNAL` errors with error messages related to an `rst_stream` error should be interpreted as `UNAVAILABLE` errors instead of internal errors. This PR creates a custom retry predicate to allow retrying of `INTERNAL` errors with rst_stream specific error messages if the `ServiceUnavailable` exception is allowed to be retried. --------- Co-authored-by: Daniel Sanche <sanche@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
daniel-sanche
force-pushed
the
shim/10-read-rows-rst-stream
branch
from
September 2, 2026 21:58
560d5b8 to
2e76f2d
Compare
mutianf
approved these changes
Sep 3, 2026
| # special case: treat InternalServerError with rst_stream error message as ServiceUnavailable | ||
| def rst_check(e): | ||
| return ( | ||
| core_exceptions.ServiceUnavailable in exception_types |
Contributor
There was a problem hiding this comment.
is this right? why would it be both ServiceUnavailable and InternalServerError?
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.
Migrating over @gkevinzheng PR from bigtable monorepo googleapis/python-bigtable#1298
Original description:
Note to reviewers: This PR has already been reviewed and merged to a staging branch, with the intention of doing a single merge to main. We are now planning to slowly rollout these changes back to the main branch. Minimal re-review should be necessary