Skip to content
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

[CELEBORN-845][BUG] Sort memory counter won't decrease after sort failed #1766

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -134,8 +134,9 @@ public PartitionFilesSorter(
try {
task.sort();
} catch (InterruptedException e) {
logger.warn(
"File sorter thread was interrupted when expanding padding buffer.");
logger.warn("File sorter thread was interrupted.");
} finally {
memoryManager.releaseSortMemory(reservedMemoryPerPartition);
}
});
}
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
Loading