Skip to content

fix(google-cloud-bigtable): clamp mutate_row retry attempt timeouts to remaining operation timeout - #19017

Open
mutianf wants to merge 2 commits into
mainfrom
fix-mutate-row-attempt-timeout-generator
Open

mutianf wants to merge 2 commits into
mainfrom
fix-mutate-row-attempt-timeout-generator

Conversation

@mutianf

@mutianf mutianf commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

…o remaining operation timeout

Use _attempt_timeout_generator(attempt_timeout, operation_timeout) in
mutate_row so each retry attempt receives min(attempt_timeout,
remaining_operation_timeout) instead of a fixed attempt_timeout.
@mutianf
mutianf requested a review from a team as a code owner November 6, 2026 22:07

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the mutate_row method in both the async and sync autogenerated Bigtable clients to dynamically retrieve a fresh timeout for each retry attempt using _attempt_timeout_generator. Corresponding unit tests were added to verify this behavior. The review feedback suggests optimizing performance by constructing the MutateRowRequest object once outside of the retry loop, preventing redundant serialization of mutations on every retry attempt.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant