feat: clamp zero I/O concurrency#6332
Merged
joseph-isaacs merged 1 commit intovortex-data:developfrom Feb 6, 2026
Merged
Conversation
a4d49ae to
6bcc680
Compare
Comment on lines
+89
to
+96
| let raw_concurrency = reader.concurrency(); | ||
| if raw_concurrency == 0 { | ||
| tracing::warn!( | ||
| uri = ?reader.uri(), | ||
| "VortexReadAt::concurrency returned 0; clamping to 1 to avoid stalling I/O" | ||
| ); | ||
| } | ||
| let concurrency = raw_concurrency.max(1); |
Contributor
Author
There was a problem hiding this comment.
Thank you for the review, done.
6bcc680 to
299dd0b
Compare
| @@ -87,6 +87,12 @@ impl FileSegmentSource { | |||
| config | |||
| }); | |||
| let concurrency = reader.concurrency(); | |||
| if concurrency == 0 { | |||
| panic!( | |||
Contributor
Author
There was a problem hiding this comment.
I learned something, thank you.
Signed-off-by: cancaicai <2356672992@qq.com>
299dd0b to
fa33a1b
Compare
robert3005
approved these changes
Feb 6, 2026
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 PR adds a small safety guard in FileSegmentSource::open(): if VortexReadAt::concurrency() returns 0, we log a warning and clamp it to 1. This avoids potential stalls or panics from calling buffer_unordered(0) while keeping normal behavior unchanged for valid concurrency values.