GeezerVison is showing github.com — fix(bigtable): restore the mutation lifecycle in mutate_rows and DirectRow.commit by mutianf · Pull Request #18856 · googleapis/google-cloud-python
Conversation
mutianf
commented
Oct 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Table.mutate_rows documents that rows which fail keep their mutations so they
can be applied again, and rows that succeed are cleaned up, but the reroute to
the data client dropped the clearing entirely — so the retry idiom the docstring
describes resent mutations that had already committed. DirectRow.commit kept
its own documented behaviour of clearing after every returned status, but it
reported the synthetic DeadlineExceeded on timeout instead of the real error
from the wire, and the migration's finally had started discarding the mutations
even when the call raised and left the caller nothing to act on. Also documents
MutationsBatcher.mutate, which keeps no reference to the rows it batches and so
cannot clear them.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
There was a problem hiding this comment.
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 improves mutation handling and error reporting in the Bigtable client. It updates mutate_rows to clear mutations only for successfully applied rows, documents mutation lifecycle behaviors, and introduces _get_status_from_operation_error to unwrap synthetic DeadlineExceeded exceptions and expose the underlying terminal wire errors. Additionally, feedback was provided to use exc.details or [] in _get_status to prevent a potential TypeError in protobuf when exc.details is None.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ctRow.commit
Change-Id: Ie61267e3c48af161c0a1a0d8d06ee1e68ebb10f9
Uh oh!
There was an error while loading. Please reload this page.
Change-Id: Ice21169fa5a2c0063ab5542d94db2eb1b7bccb1f
|
|
# is what commit() has always done. An exception that cannot be turned
|
|
|
# into a status escapes instead (it did before the reroute too, where
|
|
|
# clear() ran after mutate_rows returned), and the caller gets no
|
|
|
# outcome to act on, so the mutations are left in place for them.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this comment is a bit long, and it currently reads more like a commit message referencing past states ("before the reroute"). It could be confusing in the future, reviewing the code in isolation
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call — reworded so it describes the behaviour rather than the history:
# Clear once a status is produced, success or failure. An error that
# cannot be turned into a status propagates instead, and the mutations
# stay on the row so the caller can retry them.
Fixed in 1d27cbb.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Change-Id: I3b960f653adc766c6e703d4da1e95a4e37442546
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|