Skip to content

feat(bigtable): route point read rows to shim#13542

Open
mutianf wants to merge 1 commit into
googleapis:mainfrom
mutianf:stream
Open

feat(bigtable): route point read rows to shim#13542
mutianf wants to merge 1 commit into
googleapis:mainfrom
mutianf:stream

Conversation

@mutianf

@mutianf mutianf commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@mutianf mutianf requested review from a team as code owners June 23, 2026 02:57

@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 MaybePointReadCallable to route single-point ReadRows queries through a unary point-read callable, allowing them to benefit from session-shim optimizations. It also adds helper methods in Query to identify single-point queries and updates EnhancedBigtableStub to integrate this new routing logic. The reviewer feedback highlights several critical improvements: addressing potential synchronous exceptions and cancellation handling in MaybePointReadCallable to comply with the ResponseObserver contract, and properly propagating custom retryableCodes when routing ReadRows calls to point reads.

@mutianf

mutianf commented Jun 23, 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 MaybePointReadCallable to optimize ReadRows calls by routing single-row point queries through a unary point-read callable, allowing them to benefit from session-shim optimizations. It also adds helper methods in Query to identify single-point queries and extracts a reusable createPointReadCallable helper in EnhancedBigtableStub. A critical bug was identified in EnhancedBigtableStub where the locally created readRowsCallable is ignored in favor of the class field readRowCallable, bypassing the custom retry settings and row adapter.

@@ -302,16 +327,20 @@ public <RowT> UnaryCallable<Query, RowT> createReadRowCallable(RowAdapter<RowT>
BigtableUnaryOperationCallable<Query, RowT> classic =
new BigtableUnaryOperationCallable<>(
readRowCallable,

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.

high

There is a bug here where the locally created readRowsCallable (which is configured with the correct retrySettings, retryableCodes, and rowAdapter) is ignored. Instead, the class field readRowCallable is passed to BigtableUnaryOperationCallable. This causes the custom retry settings and the generic rowAdapter to be bypassed. Please update this to use readRowsCallable.

Suggested change
readRowCallable,
readRowsCallable,

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