Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/10705#discussion_r53688782
--- 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 --
The reason for this is pretty convoluted; I'll explain offline.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]