Skip to content

fix(bigtable): avoid mutating Query in-place in createPointReadCallable - #14797

Open
igorbernstein2 wants to merge 2 commits into
googleapis:mainfrom
igorbernstein2:b573788134
Open

igorbernstein2 wants to merge 2 commits into
googleapis:mainfrom
igorbernstein2:b573788134

Conversation

@igorbernstein2

Copy link
Copy Markdown
Contributor

Set rows_limit = 1 on the built ReadRowsRequest proto instead of calling query.limit(1) in EnhancedBigtableStub.createPointReadCallable, preventing in-place mutation of the caller's Query instance when a point read or single-key readRows executes on the classic path.

@igorbernstein2
igorbernstein2 requested review from a team as code owners October 27, 2026 21:40

@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 modifies EnhancedBigtableStub to prevent mutating the original Query object when performing a point read. Instead of calling query.limit(1), the code now converts the query to a proto builder and sets the row limit on the proto representation directly. A corresponding unit test has been added to verify that reusing the query object does not carry over the single-row limit. There are no review comments to address, and the changes look solid.

This branch has not been deployed

No deployments
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.

2 participants