Reclaim idle connections across routes in RouteSegmentedConnPool - #722
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
arturobernalg
marked this pull request as draft
October 3, 2026 15:45
arturobernalg
force-pushed
the
offlock-cross-route-reclaim
branch
from
October 3, 2026 17:27
bc8c1b4 to
715f22a
Compare
arturobernalg
marked this pull request as ready for review
October 4, 2026 04:40
arturobernalg
force-pushed
the
offlock-cross-route-reclaim
branch
from
October 4, 2026 10:09
ca1e57e to
62db52e
Compare
arturobernalg
force-pushed
the
offlock-cross-route-reclaim
branch
from
October 4, 2026 15:55
9159a06 to
bf93e5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RouteSegmentedConnPoolcurrently stops allocating when the global limit is reached, even if another route holds an idle reusable entry.This change allows the pool to reclaim an idle entry from another route and transfer the global allocation slot to the requesting route.
The hot path remains route-local. Cross-route reclamation is only attempted when normal allocation cannot proceed because
maxTotalhas been reached.It also ensures pending routes are retried when global capacity becomes available, while avoiding unnecessary drain activity for routes already at their per-route limit.
Benchmarks show no regression on the hot path and improved throughput for the full-pool cross-route case.