-
Notifications
You must be signed in to change notification settings - Fork 169
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
fix: Include active spiller when computing peak shuffle memory #196
Conversation
@@ -257,6 +257,7 @@ private long getMemoryUsage() { | |||
for (SpillSorter sorter : spillingSorters) { | |||
totalPageSize += sorter.getMemoryUsage(); | |||
} | |||
totalPageSize += activeSpillSorter.getMemoryUsage(); |
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.
[doubt] any ideas for testing it ? whats the max variance this can cause in worst case ? activeSpillSorter is just full ?
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.
I'm not sure how to test this in a unit test, but this is clearly something missing. In the non-async path, only activeSpillSorter
is used for sorting and spilling, and currently getMemoryUsage
doesn't take account of it.
Oh, seems you need to check if it is null.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #196 +/- ##
=========================================
Coverage 33.30% 33.31%
Complexity 767 767
=========================================
Files 107 107
Lines 35372 35375 +3
Branches 7657 7658 +1
=========================================
+ Hits 11782 11784 +2
Misses 21144 21144
- Partials 2446 2447 +1 ☔ View full report in Codecov by Sentry. |
Thanks, merged |
Which issue does this PR close?
Closes #.
Rationale for this change
We should include
activeSpillerSorter
when calculating peak shuffle memory. Otherwise, the stats will be inaccurate.What changes are included in this PR?
How are these changes tested?