Merged
Conversation
* Add idle and reap methods to connection pool * Change ConnectionPool#reap idle_seconds default value from 0 to 60 0 seconds is on the aggresive, setting to a more sane value of 60 seconds to prevent connection reaping/creation thrash. * Update README with information on new ConnectionPool methods #reap and #idle * add section to README about creating a reaper thread
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
While default autofix is handy, the configuration makes it so that auto-fixable issues don't trigger a CI failure
* Fix reaper exhausting the queue After max queue size connections have been reaped, no new connections are allowed to be created. * Reduce contention on the stack mutex The connection shutdown block can safely happen outside the mutex. This allows another thread to safely grab a connection while the reaper is still working through old connections. * Handle stack shutdown in reap
* Add test cases for reload that assert connections are not created if at the connection pool size The TimedStack class currently allows * Ensure TimedStack does not create more connections than max size even after reload. * remove decrement_created method in favor of inline * add test case to ensure shutdown and reap can be called after errors
Create connections while not holding the mutex so that multiple connections can be created at once, and so that any slowdown with making connections doesn't stop existing connections from being used. We optimistically treat the connection as created (by incrementing `@created`) so it's still impossible to create more than the max number of connections. This should ensure that the existing connections remain accessible even while a new connection is being created. Original author: drp@stileeducaiton.com Rebased by Alex and removed formatting discrepancy. Please do NOT auto-format this file to avoid needing to manually reconcile future pulls.
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.
Changes from upstream:
Our change: