-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Bug] Fix potenial bug when the index reading offset is greater than data length #320
Conversation
Here's an extra judgment.
|
You could use the test case to check this @leixm . It will fail. |
cc @kaijchen |
Do you find this problem in your online environment? Maybe we should also add some logs. |
You're right, it's a potenial bug. |
No. I just found this bug when browsing recent commits.
Good ideas. I will add some logs |
Codecov Report
@@ Coverage Diff @@
## master #320 +/- ##
============================================
+ Coverage 61.07% 61.13% +0.06%
- Complexity 1493 1497 +4
============================================
Files 185 185
Lines 9327 9329 +2
Branches 903 903
============================================
+ Hits 5696 5703 +7
+ Misses 3326 3322 -4
+ Partials 305 304 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks @zuston for the improvement, this change looks good.
Please remove the [WIP]
tag in title if there is nothing to add.
common/src/test/java/org/apache/uniffle/common/segment/FixedSizeSegmentSplitterTest.java
Outdated
Show resolved
Hide resolved
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.
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.
LGTM
LGTM. |
What changes were proposed in this pull request?
Fix potenial bug when the index reading offset equals to data length
Why are the changes needed?
If the reading length == data length in
FixedSizeSegmentSplitter
, it should involve this block. And if its length > data length. it should abort it.Does this PR introduce any user-facing change?
No
How was this patch tested?
UTs