File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
core/src/main/scala/org/apache/spark/storage Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments