-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Polish for fixes from #223 and #224 #226
Merged
Commits on Oct 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a4776a3 - Browse repository at this point
Copy the full SHA a4776a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38af099 - Browse repository at this point
Copy the full SHA 38af099View commit details -
Configuration menu - View commit details
-
Copy full SHA for a62d048 - Browse repository at this point
Copy the full SHA a62d048View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9f71b2 - Browse repository at this point
Copy the full SHA f9f71b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b03e30b - Browse repository at this point
Copy the full SHA b03e30bView commit details -
Reap expired connections on drop
The reaper only runs against the connections in its idle pool. This is fine for reaping idle connections, but for hotly contested connections beyond their maximum lifetime this can prove problematic. Consider an active connection beyond its lifetime and a reaper that runs every 3 seconds: - [t0] Connection is idle - [t1] Connection is active - [t2] Reaper runs, does not see connection - [t3] Connection is idle This pattern can repeat infinitely with the connection never being reaped. By checking the max lifetime on drop, we can ensure that expired connections are reaped in a reason amount of time (assuming they eventually do get dropped).
Configuration menu - View commit details
-
Copy full SHA for 77ffbc7 - Browse repository at this point
Copy the full SHA 77ffbc7View commit details -
It's possible to trigger more approvals than are necessary, in turn grabbing more connections than we need. This happens when we drop a connection. The drop produces a notify, which doesn't get used until the pool is empty. The first `Pool::get()` call on an empty pool will spawn an connect task, immediately complete `notify.notified().await`, then spawn a second connect task. Both will connect and we'll end up with 1 more connection than we need. Rather than address the notify issue directly, this fix introduces some bookkeeping that tracks the number of open `pool.get()` requests we have waiting on connections. If the number of pending connections >= the number of pending gets, we will not spawn any additional connect tasks.
Configuration menu - View commit details
-
Copy full SHA for 4e51e6a - Browse repository at this point
Copy the full SHA 4e51e6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f6629a - Browse repository at this point
Copy the full SHA 9f6629aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a8ad30 - Browse repository at this point
Copy the full SHA 6a8ad30View commit details
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.