Visitar URL original
fix(bigtable): check sessionTable.closed in dispatch after lazyPool is warmed by sushanb · Pull Request #20913 · googleapis/google-cloud-go · GitHub
Skip to content

fix(bigtable): check sessionTable.closed in dispatch after lazyPool is warmed - #20913

Open
sushanb wants to merge 1 commit into
googleapis:mainfrom
sushanb:fix/bigtable-session-table-post-close
Open

sushanb wants to merge 1 commit into
googleapis:mainfrom
sushanb:fix/bigtable-session-table-post-close

Conversation

@sushanb

@sushanb sushanb commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Check t.closed.Load() at entry to sessionTable's dispatch before calling spec.pool.get().
  • Previously, guardOpen only checked t.closed during the one-shot lazyPool initialization, so ReadRow / MutateRow calls after sessionTable.Close() on an already-warmed sessionTable bypassed ErrClientClosed and dispatched into the closed invoker.
  • Add TestSessionTable_PostCloseAfterLazyOpenReturnsErrClientClosed unit test.

@sushanb
sushanb requested review from a team as code owners November 13, 2026 05:20
@sushanb
sushanb requested a review from mutianf November 13, 2026 05:20
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Nov 13, 2026

@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 ensures that dispatching operations on a closed session table returns ErrClientClosed instead of invoking the cached pool. It adds a check for t.closed.Load() in the dispatch function and includes a corresponding unit test to verify this behavior. I have no feedback to provide as there are no review comments.

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

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant