Skip to content
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

fix: pool internals improvements #1149

Merged
merged 1 commit into from
Apr 6, 2021
Merged

fix: pool internals improvements #1149

merged 1 commit into from
Apr 6, 2021

Conversation

abonander
Copy link
Collaborator

  • fix DecrementSizeGuard::drop() only waking one Waiter regardless of whether that waiter was already woken
  • fix connect-backoff loop giving up the size guard
  • don't cut in line to open a new connection
  • have tasks waiting on acquire() wake periodically to check if there's a connection in the queue

@dignifiedquire do you mind testing this?

Signed-off-by: Austin Bonander austin@launchbadge.com

* fix `DecrementSizeGuard::drop()` only waking one `Waiter` regardless of whether that waiter was already woken
* fix connect-backoff loop giving up the size guard
* don't cut in line to open a new connection
* have tasks waiting on `acquire()` wake periodically to check if there's a connection in the queue

Signed-off-by: Austin Bonander <austin@launchbadge.com>
@dignifiedquire
Copy link
Contributor

Tested and this does fix the issues I am seeing on master for all my test cases 👍

@mehcode mehcode merged commit 5295ff1 into master Apr 6, 2021
@mehcode mehcode deleted the ab/pool-tweaks branch April 6, 2021 16:04
@jplatte
Copy link
Contributor

jplatte commented Apr 6, 2021

Can this be released as SQLx 0.5.2? We just had our SQLx DB pool get stuck without any connections to give out yesterday, hoping this will ensure that doesn't happen again.

@mehcode
Copy link
Member

mehcode commented Apr 6, 2021

Yes. Planning to do that later today (merge in anything non-breaking and put out a 0.5.2).

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.

4 participants