[ISSUE #10878] fix(tieredstore): read across all file segments - #10888
[ISSUE #10878] fix(tieredstore): read across all file segments#10888yuluo-yx wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10888 +/- ##
=============================================
- Coverage 48.39% 48.30% -0.09%
+ Complexity 13562 13535 -27
=============================================
Files 1380 1380
Lines 101165 101172 +7
Branches 13127 13126 -1
=============================================
- Hits 48962 48876 -86
- Misses 46233 46308 +75
- Partials 5970 5988 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
This PR generalizes FlatAppendFile.readAsync() to read across an arbitrary number of file segments instead of the previous hard-coded 2-segment limit. The implementation uses a loop to iterate segments and CompletableFuture.allOf() for parallel reads, then combines results into a single ByteBuffer.
The fix is correct: the loop properly tracks readOffset and remainingLength, and the segment length calculation handles boundary conditions. The test covers the 3-segment case. LGTM.
Automated review by github-manager-bot
Which Issue(s) This PR Fixes
Brief Description
FlatAppendFile.readAsync now collects reads from every intersecting committed segment and combines them in order. The previous one- or two-segment fast behavior remains, while a three-segment regression now returns all 250 requested bytes.
How Did You Test This Change?