Conversation
olavloite
commented
Sep 14, 2026
- Wire ChannelPool into the Spanner client and builder via SpannerPoolBuilderExt.
- Support configuring static and dynamic channel pools through extensions, SPANNER_NUM_CHANNELS, or emulator defaults.
- Dial initial pool channels concurrently during client construction.
- Add pick_channel and resolve_affinity on Spanner for channel selection.
- Update SessionMaintainer and CacheSubscriber to lease channels from the pool.
There was a problem hiding this comment.
Code Review
This pull request integrates the ChannelPool into the Spanner client, replacing manual channel management with a robust pool that supports both static and dynamic configurations. It updates various client methods and routing logic to lease channels from the pool using pick_channel and resolve_affinity, and adds comprehensive tests for pool builder extensions and configuration resolution. A critical issue was identified in ActiveRpcGuard's implementation of StreamGuard::record_error_code, which currently causes infinite recursion and must be updated to delegate to the underlying entry.
- Wire ChannelPool into the Spanner client and builder via SpannerPoolBuilderExt. - Support configuring static and dynamic channel pools through extensions, SPANNER_NUM_CHANNELS, or emulator defaults. - Dial initial pool channels concurrently during client construction. - Add pick_channel and resolve_affinity on Spanner for channel selection. - Update SessionMaintainer and CacheSubscriber to lease channels from the pool.
afbbcd2 to
268d6d4
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request integrates the ChannelPool into the Spanner client, replacing the previous round-robin channel selection with a robust channel pool mechanism. It introduces support for both static and dynamic channel pool configurations, enabling concurrent channel dialing during client initialization via JoinSet. Additionally, it updates client operations, routing, and session maintenance to utilize channel leases and record RPC call results for health and penalty tracking. There are no review comments provided, so I have no feedback to offer.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6793 +/- ##
==========================================
+ Coverage 97.01% 97.06% +0.04%
==========================================
Files 326 326
Lines 107548 107976 +428
==========================================
+ Hits 104342 104808 +466
+ Misses 3206 3168 -38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|