googleapis / java-spanner

Apache License 2.0
54 stars 111 forks source link

feat(spanner): add manual affinity in grpc-gcp #3170

Open harshachinta opened 3 months ago

harshachinta commented 3 months ago

Earlier, gRPC-GCP maintains affinity using the ApiConfig by looking into the gRPC messages to get an affinity key.

This PR sets the affinity manually to gRPC-GCP via call options. Reason - With multiplexed sessions we need to maintain transaction to channel affinity, and with regular sessions we need to maintain session to channel affinity.

harshachinta commented 2 months ago

@psinghbay1 I have been doing a couple of testing due to which there are many unnecessary changes in this PR. I am converting this PR to draft to avoid confusion

psinghbay1 commented 2 months ago

@psinghbay1 I have been doing a couple of testing due to which there are many unnecessary changes in this PR. I am converting this PR to draft to avoid confusion

Thank you for the clarification!