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 ZPool hangs during parallel item acquisition after invalidation (… #8833

Merged
merged 1 commit into from May 21, 2024

Conversation

daemas
Copy link
Contributor

@daemas daemas commented May 9, 2024

Fix #8820

/claim #8820

@CLAassistant
Copy link

CLAassistant commented May 9, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

algora-pbc bot commented May 9, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.

@@ -215,7 +215,7 @@ object ZPool {
attempted.forEach(a => invalidated.update(_ - a)) *>
attempted.finalizer *>
state.modify { case State(size, free) =>
if (size <= range.start)
if (size <= range.start || free < 0)
Copy link
Member

Choose a reason for hiding this comment

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

How can free be less than zero? Isn't that a bug that should be fixed directly?

Copy link
Contributor Author

@daemas daemas May 12, 2024

Choose a reason for hiding this comment

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

I believe negative values represent the number of requests awaiting in queue before an item becomes available.

@jdegoes jdegoes merged commit 83940e8 into zio:series/2.x May 21, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZPool hangs during parallel item acquisition after invalidation
3 participants