Skip to content

feat(spanner): implement transaction routing logic based on database metadata isolation levels and lock modes#13800

Open
shobhitsg wants to merge 1 commit into
googleapis:mainfrom
shobhitsg:lryw_client
Open

feat(spanner): implement transaction routing logic based on database metadata isolation levels and lock modes#13800
shobhitsg wants to merge 1 commit into
googleapis:mainfrom
shobhitsg:lryw_client

Conversation

@shobhitsg

Copy link
Copy Markdown
Contributor

No description provided.

@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 dynamic database-level metadata detection (dialect, default transaction isolation level, and default read lock mode) queried from INFORMATION_SCHEMA.DATABASE_OPTIONS to replace client-side hardcoded defaults. The feedback identifies several critical issues: a correctness bug in canEnableLRYW that breaks Leader-Routed Read-Your-Writes for repeatable read transactions with unspecified lock modes, a race condition in metadataSupplier when retrieving the session reference, and a concurrency race condition in AbstractLazyInitializer between reset() and get(). Additionally, it is recommended to add a unit test to prevent regressions for repeatable reads with null lock modes.

@shobhitsg
shobhitsg force-pushed the lryw_client branch 3 times, most recently from ff1b360 to 374c33b Compare July 20, 2026 05:58
@shobhitsg
shobhitsg marked this pull request as ready for review July 20, 2026 09:37
@shobhitsg
shobhitsg requested review from a team as code owners July 20, 2026 09:37
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