Skip to content
Snippets Groups Projects
Commit 491fd1de authored by Justin Loew's avatar Justin Loew
Browse files

Handle Option.None correctly when removing an RDD (take 2)

parent a66903cd
No related branches found
No related tags found
No related merge requests found
...@@ -397,7 +397,9 @@ private[spark] class MemoryStore( ...@@ -397,7 +397,9 @@ private[spark] class MemoryStore(
def remove(blockId: BlockId): Boolean = memoryManager.synchronized { def remove(blockId: BlockId): Boolean = memoryManager.synchronized {
val entry = entries.synchronized { val entry = entries.synchronized {
val origEntry = entries.get(blockId) val origEntry = entries.get(blockId)
blockIdAndSizeSet -= new OurBlockIdAndSizeType(blockId, origEntry.size) if (origEntry != null) {
blockIdAndSizeSet -= new OurBlockIdAndSizeType(blockId, origEntry.size)
}
entries.remove(blockId) entries.remove(blockId)
} }
if (entry != null) { if (entry != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment