Skip to content

Commit

Permalink
fix: Include active spiller when computing peak shuffle memory (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao authored Mar 13, 2024
1 parent 93e81cc commit e920aa4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ private long getMemoryUsage() {
for (SpillSorter sorter : spillingSorters) {
totalPageSize += sorter.getMemoryUsage();
}
if (activeSpillSorter != null) {
totalPageSize += activeSpillSorter.getMemoryUsage();
}
return totalPageSize;
}

Expand All @@ -274,6 +277,7 @@ public long getPeakMemoryUsedBytes() {
}

private long freeMemory() {
updatePeakMemoryUsed();
long memoryFreed = 0;
if (isAsync) {
for (SpillSorter sorter : spillingSorters) {
Expand Down

0 comments on commit e920aa4

Please sign in to comment.