fix: avoid scheduler deadlock on same-priority chunks#7588
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
BubbleCal
approved these changes
Jul 6, 2026
Member
|
Hmm, too late to chime in but I wonder if there is a way we could have made all parts of the logical request have the same priority? Where was this split happening? |
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.
This fixes a scanner hang when a ranged read starts at a write-batch boundary and a wide column is split into multiple I/O chunks while another smaller, higher-priority request is scheduled in the same scan line.
The scheduler previously used only the minimum in-flight priority to decide whether a request could bypass byte backpressure. If a higher-priority request remained unconsumed while the decoder awaited a wide-column request, remaining chunks from the already-admitted wide-column request could be blocked behind the byte budget, causing a deadlock.
This changes both the standard and lite schedulers to let chunks with an already in-flight priority keep moving. It also adds scheduler-level and scanner-level regression coverage, and updates the
io_buffer_sizedocs now that this deadlock is fixed.Validated with the relevant
lance-ioscheduler tests and the targeted scanner regression.