Skip to content

Commit

Permalink
[CELEBORN-845][BUG] Sort memory counter won't decrease after sort fai…
Browse files Browse the repository at this point in the history
…led.
  • Loading branch information
FMX committed Jul 27, 2023
1 parent e16b267 commit ac9f8be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,7 @@ object CelebornConf extends Logging {
.doc("Reserved memory when sorting a shuffle file off-heap.")
.version("0.3.0")
.bytesConf(ByteUnit.BYTE)
.checkValue(v => v < Int.MaxValue, "Reserved memory per partition must be less than 2GB.")
.createWithDefaultString("1mb")

val WORKER_FLUSHER_BUFFER_SIZE: ConfigEntry[Long] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public PartitionFilesSorter(
() -> {
try {
task.sort();
memoryManager.releaseSortMemory(reservedMemoryPerPartition);
} catch (InterruptedException e) {
logger.warn(
"File sorter thread was interrupted when expanding padding buffer.");
Expand Down Expand Up @@ -586,8 +587,6 @@ public void sort() throws InterruptedException {
sortedBlockInfoMap.put(mapId, sortedShuffleBlocks);
}

memoryManager.releaseSortMemory(reserveMemory);

writeIndex(sortedBlockInfoMap, indexFilePath, isHdfs);
updateSortedShuffleFiles(shuffleKey, fileId, originFileLen);
deleteOriginFiles();
Expand Down

0 comments on commit ac9f8be

Please sign in to comment.