Skip to content

Commit

Permalink
fix: Peak memory usage should include active spiller
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Mar 12, 2024
1 parent 77ed549 commit 7d97c5b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ private long getMemoryUsage() {
for (SpillSorter sorter : spillingSorters) {
totalPageSize += sorter.getMemoryUsage();
}
totalPageSize += activeSpillSorter.getMemoryUsage();
return totalPageSize;
}

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

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

0 comments on commit 7d97c5b

Please sign in to comment.