Github user squito commented on a diff in the pull request: https://github.com/apache/spark/pull/6990#discussion_r33398416 --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala --- @@ -833,8 +833,10 @@ private[spark] class BlockManager( logDebug("Put block %s locally took %s".format(blockId, Utils.getUsedTimeMs(startTimeMs))) // Either we're storing bytes and we asynchronously started replication, or we're storing - // values and need to serialize and replicate them now: - if (putLevel.replication > 1) { + // values and need to serialize and replicate them now. + // Should not replicate the block if its StorageLevel is StorageLevel.NONE or + // putting it to local is failed. + if (!putBlockInfo.isFailed && putLevel.replication > 1) { --- End diff -- oops, I thought the purpose of this patch was something else earlier. Sorry to make you explain this again, but I am not certain I understand what is wrong w/ the current behavior. If we fail to put locally, with the current behavior, (1) the block will get replicated anyway (2) the remote peer will cache the block in the originally requested storage level if it can (eg., it will store the block in memory) since [the replicate request uses the original `putLevel`](https://github.com/apache/spark/blob/a56516fc9280724db8fdef8e7d109ed7e28e427d/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L853) and (3) the remote node will tell `BlockManagerMaster` that it has the block, b/c [`putBlockData`](https://github.com/apache/spark/blob/a56516fc9280724db8fdef8e7d109ed7e28e427d/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L316) just calls [`putBytes`](https://github.com/apache/spark/blob/a56516fc9280724db8fdef8e7d109ed7e28e427d/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L676) which defaults to `tellMast er = true`. Is my explanation of the current behavior incorrect, or is there something wrong w/ the current behavior that I'm not seeing?
--- 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