fix(spanner): preserve call options when applying statement timeout#13017
fix(spanner): preserve call options when applying statement timeout#13017akash329d wants to merge 1 commit intogoogleapis:mainfrom
Conversation
|
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. |
There was a problem hiding this comment.
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.
Follow-up to #12726. The grpc-gcp affinity routing it (and googleapis/grpc-gcp-java#235) introduced is bypassed when a
statement_timeoutis set. With multiplexed sessions every data RPC then falls back to the api-configaffinity_key: "session"rule and has the same original issue.Build the configurator's result from the input
contextinstead so the call options survive the merge. The relative timeout is still applied;merge()already requires aGrpcCallContext, so the cast is safe.