Skip to content

Merge upstream 250#2

Merged
alexf101 merged 8 commits intomainfrom
merge_upstream_250
Apr 10, 2025
Merged

Merge upstream 250#2
alexf101 merged 8 commits intomainfrom
merge_upstream_250

Conversation

@jeffparsons
Copy link
Copy Markdown

@jeffparsons jeffparsons commented Apr 10, 2025

Gets the reap change that we need for Redis connections

ttstarck and others added 8 commits July 27, 2024 22:59
* 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
@jeffparsons jeffparsons requested a review from alexf101 April 10, 2025 05:24
Copy link
Copy Markdown

@alexf101 alexf101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legendary

@alexf101 alexf101 merged commit d3a8599 into main Apr 10, 2025
0 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants