Github user JoshRosen commented on a diff in the pull request: https://github.com/apache/spark/pull/10705#discussion_r53728185 --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala --- @@ -805,13 +814,12 @@ private[spark] class BlockManager( } } } finally { - // If we failed in putting the block to memory/disk, notify other possible readers - // that it has failed, and then remove it from the block info map. - if (!marked) { - // Note that the remove must happen before markFailure otherwise another thread - // could've inserted a new BlockInfo before we remove it. - blockInfo.remove(blockId) - putBlockInfo.markFailure() + if (!blockWasSuccessfullyStored) { + // Guard against the fact that MemoryStore might have already removed the block if the + // put() failed and the block could not be dropped to disk. + if (blockInfoManager.lockForWriting(blockId, blocking = false).isDefined) { --- End diff -- See 504986f548e09e3097dbb84d4e50c760c538aaee
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org