Skip to content

Commit 6de20f1

Browse files
committed
add comment
1 parent 7be0ce4 commit 6de20f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ class BlockManagerMasterEndpoint(
278278
blockIdsToDel += blockId
279279
blockStatusByShuffleService.get(bmIdForShuffleService).foreach { blockStatusForId =>
280280
blockStatusForId.remove(blockId)
281+
// when all blocks are removed from the block statuses then for this BM Id the whole
282+
// blockStatusByShuffleService entry can be removed to avoid leaking memory
281283
if (blockStatusForId.isEmpty) {
282284
blockStatusByShuffleService.remove(bmIdForShuffleService)
283285
}

0 commit comments

Comments
 (0)