Skip to content

fix(spanner): preserve call options when applying statement timeout#13017

Open
akash329d wants to merge 1 commit intogoogleapis:mainfrom
akash329d:spanner-statement-timeout-affinity
Open

fix(spanner): preserve call options when applying statement timeout#13017
akash329d wants to merge 1 commit intogoogleapis:mainfrom
akash329d:spanner-statement-timeout-affinity

Conversation

@akash329d
Copy link
Copy Markdown

@akash329d akash329d commented May 6, 2026

Follow-up to #12726. The grpc-gcp affinity routing it (and googleapis/grpc-gcp-java#235) introduced is bypassed when a statement_timeout is set. With multiplexed sessions every data RPC then falls back to the api-config affinity_key: "session" rule and has the same original issue.

Build the configurator's result from the input context instead so the call options survive the merge. The relative timeout is still applied; merge() already requires a GrpcCallContext, so the cast is safe.

@akash329d akash329d requested review from a team as code owners May 6, 2026 00:01
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

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 AbstractBaseUnitOfWork.java to ensure that existing GrpcCallContext options, such as affinity keys, are preserved when configuring call timeouts. By building from the provided input context instead of creating a default one, the change prevents existing call options from being dropped during the merge process. There were no review comments provided for this pull request, so I have no feedback to provide regarding the review itself.

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