-
Notifications
You must be signed in to change notification settings - Fork 141
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
[#881] fix: Ensure LocalStorageMeta disk size is correctly updated when events are processed #902
Conversation
Codecov Report
@@ Coverage Diff @@
## master #902 +/- ##
============================================
+ Coverage 55.24% 57.09% +1.84%
- Complexity 2201 2202 +1
============================================
Files 333 313 -20
Lines 16449 14091 -2358
Branches 1307 1308 +1
============================================
- Hits 9087 8045 -1042
+ Misses 6851 5605 -1246
+ Partials 511 441 -70
... and 21 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@zuston Could you review this pr? Because you are more familiar with this part of code. |
Oh, yes, let me take a look in the next few days |
I noticed this whilst benchmarking Uniffle. It makes the settings related to disk capacity almost void and this fix fixed it for me |
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, I think we can merge this pr first. @zuston When you have time, you can give another suggestion and raise a follow-up pr. Thanks all.
@awdavidson Could you tell me your company? Do you use Uniffle in your production environment? |
@awdavidson There is conflict in the branch 0.7. Could you raise a pr for branch 0.7? |
…ted when events are processed (apache#902) Ensure all events are marked as understorage, this will result to the LocalStorageMeta being updated when events are processed. Currently LocalStorageMeta is only update with metrics from the first event in a given shuffleId and partitionId, the first event updates metrics because there is no entry in `partitionsOfStorage` and the event get marked as `underStorage`, however, for future events in the same shuffleId and partitionId `selectStorage` returns the storage and does not mark the event as `underStorage` so when `updateWriteMetrics` is called, `event.getUnderStorage()` returns null and `storage.updateWriteMetrics(metrics);` is skipped. As metrics are not updated correctly, `LocalStorage.canWrite` will not return the correct result. No. Added unit test which covers multi events for the same shuffleId and partitionId
What changes were proposed in this pull request?
Ensure all events are marked as understorage, this will result to the LocalStorageMeta being updated when events are processed.
Why are the changes needed?
Currently LocalStorageMeta is only update with metrics from the first event in a given shuffleId and partitionId, the first event updates metrics because there is no entry in
partitionsOfStorage
and the event get marked asunderStorage
, however, for future events in the same shuffleId and partitionIdselectStorage
returns the storage and does not mark the event asunderStorage
so whenupdateWriteMetrics
is called,event.getUnderStorage()
returns null andstorage.updateWriteMetrics(metrics);
is skipped.As metrics are not updated correctly,
LocalStorage.canWrite
will not return the correct result.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added unit test which covers multi events for the same shuffleId and partitionId