Commit 55a3136
committed
fix(spanner): drop sticky AFFINITY_KEY for static gRPC-GCP pool
The static-pool path bounded the affinity key to (-numChannels..numChannels)
distinct values. Under a high-concurrency cold start, all keys race through
GcpManagedChannel.pickLeastBusyChannel before any caller's start() has
incremented activeStreamsCount, so they all tie to channelRefs[0] and bind
there permanently. The result is most RPCs route through a single HTTP/2
connection and queue at MAX_CONCURRENT_STREAMS (~100), capping per-client
throughput. Regression became default-path behavior in 6.105.0 (#4239).
With multiplexed sessions there is no per-transaction locality benefit from
sticky channel affinity. Dropping the key for the static-pool case makes
GcpManagedChannel.getChannelRef(null) do a fresh per-call least-busy pick
with no sticky bind, which self-corrects and matches the dynamic-pool /
disableGrpcGcpExtension() throughput curve.1 parent 15faaaa commit 55a3136
File tree
1 file changed
+18
-16
lines changed- java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1
1 file changed
+18
-16
lines changedLines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2275 | 2275 | | |
2276 | 2276 | | |
2277 | 2277 | | |
2278 | | - | |
2279 | | - | |
2280 | 2278 | | |
2281 | 2279 | | |
2282 | 2280 | | |
2283 | 2281 | | |
2284 | 2282 | | |
2285 | | - | |
2286 | | - | |
2287 | | - | |
2288 | | - | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
2292 | | - | |
2293 | | - | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
| 2283 | + | |
2298 | 2284 | | |
2299 | 2285 | | |
2300 | | - | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
2301 | 2296 | | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
2302 | 2304 | | |
2303 | 2305 | | |
2304 | 2306 | | |
| |||
0 commit comments