-
Notifications
You must be signed in to change notification settings - Fork 622
refactor: idle pool and fix non-deterministic teardown of idle cleanup goroutine #1687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kavirajk
merged 26 commits into
ClickHouse:main
from
GeorgeMac:gm/idle-connection-cleanup-leak
Nov 25, 2025
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
63ee9fe
refactor: idle pool and fix non-deterministic teardown of idle cleanu…
GeorgeMac 09bf7a4
fix(pool): close connection after draining
GeorgeMac 5a7adc7
refactor(pool): peek at min entry to check expiration and avoid exces…
GeorgeMac d1b7e47
refactor(pool): adjust cleanup ticker duration based on pools minimum
GeorgeMac 4e9d535
fix(pool): only skip or remove min when pool at capacity on Put
GeorgeMac e8faaa1
test(pool): update test to ensure idle capacity is assert properly
GeorgeMac 4742580
fix(clickhouse): use atomic bool for closed flag
GeorgeMac d7d4d5f
fix(clickhouse): return context error instead of err acquire context …
GeorgeMac 9a9ad4a
fix(tests): use context cancel cause to send specific dial timeout error
GeorgeMac 88d5d16
refactor(pool): replace min heap with circular queue / buffer
GeorgeMac 746e196
fix(pool): close bad conn on put and on release when closed
GeorgeMac 66068f4
test: add syntest around connection open and close
GeorgeMac 628c073
Merge branch 'main' into gm/idle-connection-cleanup-leak
kavirajk 3703c45
Merge branch 'main' into gm/idle-connection-cleanup-leak
kavirajk b05ec25
refactor: rename idlePool to connPool
GeorgeMac 2d621c4
refactor(circular): rename Compact to DeleteFunc
GeorgeMac b3d49b3
refactor: rename tests referring to idle pool to conn pool
GeorgeMac 155cee1
test: ensure drain pool routine removes and closes expired conns
GeorgeMac 6b2acda
fix(test): remove double call to wg.Done
GeorgeMac 5e8ba58
refactor(circular): unexport Queue.All to Queue.all
GeorgeMac 3727502
chore: add documentation to connection pool
GeorgeMac a9eb436
feat: add context cancel check to *clickhouse.dial
GeorgeMac cb9cc6f
test: add test around clickhouse acquire and release
GeorgeMac 89111f6
refactor(pool): remove unnecessary closed check in Get body loop
GeorgeMac 4db0968
refactor(pool): return non-nil error when pool is empty
GeorgeMac dc0eae1
Merge branch 'main' into gm/idle-connection-cleanup-leak
GeorgeMac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.