-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
[ISSUE #7345] Fix wrong result of searchOffset in tiered storage #7346
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #7346 +/- ##
=============================================
- Coverage 42.65% 42.61% -0.05%
+ Complexity 9473 9456 -17
=============================================
Files 1150 1150
Lines 82754 82756 +2
Branches 10789 10790 +1
=============================================
- Hits 35300 35265 -35
- Misses 43043 43074 +31
- Partials 4411 4417 +6
... and 28 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/TieredFlatFile.java
Show resolved
Hide resolved
return fileSegmentList.isEmpty() ? null : fileSegmentList.get(fileSegmentList.size() - 1); | ||
if (fileSegmentList.isEmpty()) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fileSegmentList
并非排序过滤后的,segmentList
才是
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该是排序好了的,segmentList为空才走到这里
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这个上下文中我没有看到fileSegmentList
排序的依据,辛苦贴一下相关代码位置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他是按照 base offset 来排序的
Which Issue(s) This PR Fixes
Fixes #7345
Brief Description
How Did You Test This Change?