Skip to content

test(spanner): unflake ITSqlMusicScriptTest - #14814

Open
sakthivelmanii wants to merge 1 commit into
mainfrom
unflake-test01-runscript
Open

sakthivelmanii wants to merge 1 commit into
mainfrom
unflake-test01-runscript

Conversation

@sakthivelmanii

Copy link
Copy Markdown
Contributor

Problem

  • KeyAwareChannel inadvertently attaches routing hints to ExecuteSqlRequest calls inside Partitioned DML transactions when pinned to an affinity endpoint.
  • This results in invalid arguments when executing Partitioned DML (ExecuteStreamingSql) queries.

Solution

  • KeyAwareChannel now tracks Partitioned DML transaction IDs from BeginTransaction options.
  • routeFromRequest(ExecuteSqlRequest) skips attaching routing hints for Partitioned DML queries, resolving the issue.

KeyAwareChannel incorrectly attached routing hints to ExecuteSqlRequest calls inside Partitioned DML transactions when pinned to an affinity endpoint. The fix tracks Partitioned DML transaction IDs from BeginTransaction options so routeFromRequest(ExecuteSqlRequest) skips attaching routing hints for Partitioned DML queries.
@sakthivelmanii
sakthivelmanii enabled auto-merge (squash) October 28, 2026 18:54
@sakthivelmanii
sakthivelmanii requested a review from a team as a code owner October 28, 2026 18:54
@sakthivelmanii

Copy link
Copy Markdown
Contributor Author

/gemini review

@sakthivelmanii
sakthivelmanii requested a review from a team as a code owner October 28, 2026 18:55

@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 routing hints are never attached to Partitioned DML requests in KeyAwareChannel. It introduces a cache to track Partitioned DML transaction IDs and bypasses attaching routing hints for these transactions, routing them to the affinity or default endpoint instead. A unit test has been added to verify this behavior. I have no feedback to provide.

@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 Partitioned DML transactions do not carry routing hints by introducing a cache to track Partitioned DML transaction IDs in KeyAwareChannel. Requests for these transactions are routed without a routing hint, preventing them from being executed on the fastpath which does not support Partitioned DML. A unit test has been added to verify this behavior. I have no feedback to provide on these changes.

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.

1 participant