Skip to content

Commit dd96fcd

Browse files
committed
Updated the comment for SPARK-2162.
A follow up on #1103 @andrewor14 Author: Reynold Xin <[email protected]> Closes #1117 from rxin/SPARK-2162 and squashes the following commits: a4231de [Reynold Xin] Updated the comment for SPARK-2162.
1 parent 5ad5e34 commit dd96fcd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,13 @@ private[spark] class BlockManager(
363363
val info = blockInfo.get(blockId).orNull
364364
if (info != null) {
365365
info.synchronized {
366-
// Double check to make sure the block is still there, since removeBlock
367-
// method also synchronizes on BlockInfo object, so the block might have
368-
// been removed when we actually come here.
366+
// Double check to make sure the block is still there. There is a small chance that the
367+
// block has been removed by removeBlock (which also synchronizes on the blockInfo object).
368+
// Note that this only checks metadata tracking. If user intentionally deleted the block
369+
// on disk or from off heap storage without using removeBlock, this conditional check will
370+
// still pass but eventually we will get an exception because we can't find the block.
369371
if (blockInfo.get(blockId).isEmpty) {
370-
logDebug(s"Block $blockId had been removed")
372+
logWarning(s"Block $blockId had been removed")
371373
return None
372374
}
373375

0 commit comments

Comments
 (0)