From e26b2f6aa0571392730338960666ca66f5901f35 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Thu, 2 Jun 2016 14:09:02 -0700 Subject: [PATCH] Fix actual bug. --- .../main/scala/org/apache/spark/storage/BlockManager.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/scala/org/apache/spark/storage/BlockManager.scala b/core/src/main/scala/org/apache/spark/storage/BlockManager.scala index 2f9473aedc2dc..00fa94fc9fbf4 100644 --- a/core/src/main/scala/org/apache/spark/storage/BlockManager.scala +++ b/core/src/main/scala/org/apache/spark/storage/BlockManager.scala @@ -442,6 +442,8 @@ private[spark] class BlockManager( Some(new BlockResult(ci, DataReadMethod.Disk, info.size)) } else { releaseLock(blockId) + // Remove the missing block so that its unavailability is reported to the driver + removeBlock(blockId) throw new SparkException(s"Block $blockId was not found even though it's read-locked") } } @@ -490,6 +492,8 @@ private[spark] class BlockManager( serializerManager.dataSerialize(blockId, memoryStore.getValues(blockId).get) } else { releaseLock(blockId) + // Remove the missing block so that its unavailability is reported to the driver + removeBlock(blockId) throw new SparkException(s"Block $blockId was not found even though it's read-locked") } } else { // storage level is serialized @@ -500,6 +504,8 @@ private[spark] class BlockManager( maybeCacheDiskBytesInMemory(info, blockId, level, diskBytes).getOrElse(diskBytes) } else { releaseLock(blockId) + // Remove the missing block so that its unavailability is reported to the driver + removeBlock(blockId) throw new SparkException(s"Block $blockId was not found even though it's read-locked") } }