Skip to content

chore(spanner): core implementation for a dynamic channel pool - #6522

Open
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-dynamic-channel-pool
Open

chore(spanner): core implementation for a dynamic channel pool#6522
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-dynamic-channel-pool

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

Introduce modular channel pooling supporting static fixed-size pools and dynamic load-based scaling with Power of Two Least Busy (P2C) selection, parallel channel priming, and transaction affinity routing.

Introduce modular channel pooling supporting static fixed-size pools
and dynamic load-based scaling with Power of Two Least Busy (P2C)
selection, parallel channel priming, and transaction affinity routing.
@olavloite
olavloite requested review from a team as code owners August 24, 2026 13:28
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Aug 24, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces a comprehensive dynamic channel pooling implementation for the Spanner client. It includes transaction channel affinity management, static and dynamic pool configurations, channel entry lifecycle tracking with RAII guards, a core channel pool engine utilizing Power of Two Least Busy selection, and background scaling workers for autonomous scale-up, scale-down, and priming. I have no feedback to provide as there are no review comments to assess.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.41270% with 272 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.13%. Comparing base (102298f) to head (3c4f256).

Files with missing lines Patch % Lines
src/spanner/src/channel_pool/scaler.rs 56.29% 191 Missing ⚠️
src/spanner/src/channel_pool/pool.rs 90.41% 32 Missing ⚠️
src/spanner/src/channel_pool/config.rs 89.52% 22 Missing ⚠️
src/spanner/src/channel_pool/entry.rs 90.45% 21 Missing ⚠️
src/spanner/src/channel_pool/affinity.rs 89.83% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6522      +/-   ##
==========================================
- Coverage   96.39%   96.13%   -0.26%     
==========================================
  Files         301      306       +5     
  Lines       84762    86022    +1260     
==========================================
+ Hits        81706    82697     +991     
- Misses       3056     3325     +269     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant