GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@mutianf mutianf commented Oct 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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
All reactions
  • 👀 1 reaction
@mutianf
mutianf requested a review from a team as a code owner October 26, 2026 19:02
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Oct 26, 2026
View reviewed changes

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

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/data/_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mutianf
mutianf force-pushed the fix-bigtable-mutation-lifecycle branch from d80e09f to 7e49603 Compare October 26, 2026 19:22
@mutianf
fix(bigtable): restore the mutation lifecycle in mutate_rows and Dire…
403ca01
…ctRow.commit

Change-Id: Ie61267e3c48af161c0a1a0d8d06ee1e68ebb10f9
@mutianf
mutianf force-pushed the fix-bigtable-mutation-lifecycle branch from 7e49603 to 403ca01 Compare October 27, 2026 16:56
mutianf
mutianf commented Oct 27, 2026
View reviewed changes
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mutianf
fix(bigtable): clear mutations once after commit() produces a status
c455063
Change-Id: Ice21169fa5a2c0063ab5542d94db2eb1b7bccb1f
daniel-sanche
daniel-sanche reviewed Oct 27, 2026
View reviewed changes
Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row.py Outdated
# 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.

@daniel-sanche daniel-sanche Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

@mutianf mutianf Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

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.

All reactions
daniel-sanche
daniel-sanche approved these changes Oct 27, 2026
View reviewed changes
@mutianf
docs(bigtable): tighten the clear() comment in DirectRow.commit
1d27cbb
Change-Id: I3b960f653adc766c6e703d4da1e95a4e37442546
@mutianf
mutianf enabled auto-merge (squash) October 27, 2026 20:03
@mutianf
mutianf disabled auto-merge October 27, 2026 20:44
@mutianf
mutianf merged commit d0ce8e3 into main Oct 27, 2026
57 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mutianf
mutianf deleted the fix-bigtable-mutation-lifecycle branch October 27, 2026 20:44
@release-please release-please Bot mentioned this pull request Oct 27, 2026
chore(main): release google-cloud-bigtable 2.50.3 #18829
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daniel-sanche daniel-sanche daniel-sanche approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@mutianf @daniel-sanche
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.