Skip to content

fix(bigtable): deprecate no-op FailedMutation add - #16646

Merged
sushanb merged 1 commit into
googleapis:mainfrom
sushanb:fix/bigtable-bulk-mutation-failed-mutation
Nov 10, 2026
Merged

sushanb merged 1 commit into
googleapis:mainfrom
sushanb:fix/bigtable-bulk-mutation-failed-mutation

Conversation

@sushanb

@sushanb sushanb commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Deprecate the no-op BulkMutation::emplace_back(FailedMutation) overload, log an error if invoked at runtime, and update FailedMutation / PermanentMutationFailure Doxygen comments.

Motivation

FailedMutation stores only the failure Status and original_index()—it does not retain the SingleRowMutation payload. Consequently, BulkMutation::emplace_back(FailedMutation) did not append an entry to request_. Callers building a retry BulkMutation from FailedMutation results produced an empty batch (empty() == true), causing BulkApply / AsyncBulkApply to return {} immediately without sending an RPC and silently dropping the failed writes.

Changes

  • Mark BulkMutation::emplace_back(FailedMutation) with GOOGLE_CLOUD_CPP_DEPRECATED(...) while preserving ABI compatibility, and emit a GCP_LOG(ERROR) diagnostic including original_index() if called.
  • Update Doxygen comments on FailedMutation and PermanentMutationFailure::failures() to document using original_index() with the original SingleRowMutation list.
  • Add unit tests in mutations_test.cc verifying the deprecation diagnostic and retry-batch construction via original_index().

Validation

  • bazel test //google/cloud/bigtable:mutations_test

BulkMutation::emplace_back(FailedMutation) does not retain or re-add the original mutation payload to the underlying MutateRowsRequest, causing retry batches built from FailedMutation objects to short-circuit as empty and silently drop writes.

Mark BulkMutation::emplace_back(FailedMutation) deprecated while preserving ABI compatibility, emit a GCP_LOG(ERROR) diagnostic if called at runtime, and update stale Doxygen comments on FailedMutation and PermanentMutationFailure::failures().
@sushanb
sushanb requested a review from a team as a code owner November 10, 2026 03:45
@sushanb
sushanb requested a review from scotthart November 10, 2026 03:45
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Nov 10, 2026

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

Copy link
Copy Markdown

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 deprecates the BulkMutation::emplace_back(FailedMutation) overload in the Cloud Bigtable library, as FailedMutation no longer retains the original mutation payload. The method is now a no-op that logs an error, and documentation has been updated to instruct users to use FailedMutation::original_index() to look up and re-add the original SingleRowMutation. Unit tests have been added to verify this deprecated behavior and demonstrate the correct pattern for resending failed mutations. I have no feedback to provide as there are no review comments to assess.

@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.52%. Comparing base (b32a1f5) to head (83da410).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16646   +/-   ##
=======================================
  Coverage   92.51%   92.52%           
=======================================
  Files        2269     2269           
  Lines      222804   222843   +39     
=======================================
+ Hits       206126   206177   +51     
+ Misses      16678    16666   -12     

☔ View full report in Codecov by Harness.
📢 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.

@sushanb
sushanb merged commit 5dcdef5 into googleapis:main Nov 10, 2026
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo