Repository navigation
fix(driver): key is not unique when spawn_blocking - #675
Merged
George-Miao merged 5 commits intoFeb 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a panic/logic error in the io-uring driver where blocking operations dispatched to the thread pool could leave a Key in a non-unique/leaked state when dispatch fails (e.g., pool saturated), leading to "Key not unique" at result take time.
Changes:
- Replace
SegQueue-based completion collection with aflumechannel for completed blocking entries. - Refactor blocking dispatch to retry
AsyncifyPool::dispatchwithout dropping the frozen key/closure on failure. - Minor logging/comment wording tweaks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
George-Miao
force-pushed
the
fix/driver/key-dup-blocking
branch
from
February 12, 2026 02:23
379ebf2 to
e3d664f
Compare
Berrysoft
approved these changes
Feb 12, 2026
Closed
Berrysoft
pushed a commit
that referenced
this pull request
Feb 12, 2026
* fix(driver,iour): key not unique when spawn_blocking * feat: no busy spin * feat: add test for small pool * fix(driver,iocp): push_blocking stuck * fix: poll
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.
Closes #674.
Old implementation creates a new closure everytime threadpool is full, which creates a new clone of
Keyand freezes it. This leaks the key and causes panic. This PR also replacesArc<SegQueue>with flume in blocking threadpool, I'm not sure about performance impact though.