Updated the comment for SPARK-2162.
A follow up on #1103 @andrewor14 Author: Reynold Xin <rxin@apache.org> Closes #1117 from rxin/SPARK-2162 and squashes the following commits: a4231de [Reynold Xin] Updated the comment for SPARK-2162.
This commit is contained in:
parent
5ad5e3486a
commit
dd96fcda01
|
@ -363,11 +363,13 @@ private[spark] class BlockManager(
|
||||||
val info = blockInfo.get(blockId).orNull
|
val info = blockInfo.get(blockId).orNull
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
info.synchronized {
|
info.synchronized {
|
||||||
// Double check to make sure the block is still there, since removeBlock
|
// Double check to make sure the block is still there. There is a small chance that the
|
||||||
// method also synchronizes on BlockInfo object, so the block might have
|
// block has been removed by removeBlock (which also synchronizes on the blockInfo object).
|
||||||
// been removed when we actually come here.
|
// Note that this only checks metadata tracking. If user intentionally deleted the block
|
||||||
|
// on disk or from off heap storage without using removeBlock, this conditional check will
|
||||||
|
// still pass but eventually we will get an exception because we can't find the block.
|
||||||
if (blockInfo.get(blockId).isEmpty) {
|
if (blockInfo.get(blockId).isEmpty) {
|
||||||
logDebug(s"Block $blockId had been removed")
|
logWarning(s"Block $blockId had been removed")
|
||||||
return None
|
return None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue