Skip to content

feat(bigtable): support SessionReadModifyWriteRow on the session client - #14585

Merged
mutianf merged 12 commits into
googleapis:mainfrom
mutianf:readModifyWrite
Oct 13, 2026
Merged

mutianf merged 12 commits into
googleapis:mainfrom
mutianf:readModifyWrite

Conversation

@mutianf

@mutianf mutianf commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Support SessionReadModifyWriteRow.

And some minor clean ups.

@mutianf
mutianf requested review from a team as code owners October 6, 2026 14:00

@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 introduces support for ReadModifyWriteRow operations in the session-based data path of the Bigtable client. It adds the necessary request/response handling, descriptors, and a new ReadModifyWriteRowShim class, along with comprehensive unit tests. The feedback recommends removing an obsolete TODO comment in TableAsync.java regarding retrieving the deadline from the compatibility layer, as this is already successfully implemented.

…lowing ReadRowShim pattern

Extract session pool logic into ReadModifyWriteRowShimInner and make
ReadModifyWriteRowShim<RowT> a stateless generic wrapper that pairs the
inner with a RowAdapter passed from EnhancedBigtableStub.

Change-Id: I56654ae6c4d0c051d01bfc85f672d474d192e2d8
- Remove stale TODO comments from TableAsync.readModifyWriteRow
- Rephrase "must never be retried" to "should not be retried unless
  directed by server" for CheckAndMutateRow and ReadModifyWriteRow in
  TableBase
- Extract shared buildRow logic into RowConverter utility, used by both
  ReadRowShim and ReadModifyWriteRowShim
- Remove CheckAndMutateRowShim and ReadModifyWriteRowShimInner from
  ShimImpl until session routing is enabled; decorator methods now
  return the classic callable directly to avoid creating unused session
  pools

Change-Id: I7a803404cbf5c945b7e03aac4c970f0ed31feec8
…M and RMW shims

- Move buildRow logic from RowConverter into Util (no separate class needed)
- Implement proper supports() in CheckAndMutateRowShim and
  ReadModifyWriteRowShimInner using session pool checks, matching
  ReadRowShimInner's pattern
- Short-circuit routing in ShimImpl.decorateCheckAndMutateRow and
  decorateReadModifyWriteRow (return classic) until diversion by method
  is enabled; enabling routing is a one-line change per operation

Change-Id: Iab114d444dc5dbf9645d46d96028056f759cb9ab
- Use inline named-arg comments for null descriptors in MaterializedViewAsync
- Add explanation comment for RetryingVRpc with idempotent=false
- Add circuit-breaker explanation to supports() in CheckAndMutateRowShim and ReadModifyWriteRowShimInner
- Inline buildRow helper in ReadModifyWriteRowShim
- Introduce WipFeatures constants and implement the disabled-shim guard pattern in ShimImpl
…wBuilderShim, move buildRowFromProto to RowAdapter

- Move shouldRouteToSession circuit-breaker + MAX_CONSECUTIVE_UNIMPLEMENTED_FAILURES from ShimImpl to UnaryShim (same package as ops, no inverted dependency)
- Add generic RowBuilderShim<ReqT, ProtoRespT, RowT> that wraps a raw-proto shim + RowAdapter + row-extractor lambda, eliminating per-op row-building boilerplate
- Move buildRow helper from Util to RowAdapter.buildRowFromProto() default method
- Rename ReadRowShimInner → ReadRowShim and ReadModifyWriteRowShimInner → ReadModifyWriteRowShim (old thin-factory wrappers removed)
- Gate CheckAndMutateRow and ReadModifyWriteRow session paths behind WipFeatures flags
…uteToSession, and RowAdapter.buildRowFromProto
…dModifyWriteRowShim tests

- Remove buildRowFromProto default method from the public RowAdapter interface
  to avoid silently affecting custom implementations; move the logic to a
  package-private static helper in RowBuilderShim where it is actually used.
- Add ReadModifyWriteRowShimTest covering supports() (TableId/AuthorizedViewId,
  circuit-breaker threshold, unsupported TargetId) and call() happy paths.
- Add TODO to CheckAndMutateRowShim to merge READ_WRITE pools with
  ReadModifyWriteRowShim once backend permission is confirmed.
- Remove duplicate circuit-breaker comments from shim call sites; the
  explanation lives on UnaryShim.shouldRouteToSession().
… and ReadModifyWriteRow

Extract ReadWriteSessionPools to hold the shared PERMISSION_READ_WRITE SessionPoolMaps.
Both CheckAndMutateRowShim and ReadModifyWriteRowShim now use the same pool per table,
halving session connections and unifying circuit-breaker failure tracking across the two RPCs.
@mutianf

mutianf commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 introduces support for the ReadModifyWriteRow operation in the session-based data path. Key changes include the addition of ReadModifyWriteRowShim and ReadWriteSessionPools to manage and share read-write session pools, the introduction of a generic RowBuilderShim to simplify row adaptation, and the integration of these components into TableAsync, AuthorizedViewAsync, and EnhancedBigtableStub. Additionally, work-in-progress feature flags have been added to control the rollout of these features. I have no further feedback to provide as there are no review comments.

…ndMutate and ReadModifyWriteRow"

This reverts commit 4ca4370.
@mutianf
mutianf enabled auto-merge (squash) October 13, 2026 19:13
@mutianf mutianf added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2026
@mutianf
mutianf merged commit 8e653b2 into googleapis:main Oct 13, 2026
210 checks passed
@mutianf
mutianf deleted the readModifyWrite branch October 14, 2026 01:19
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.

3 participants