prakharjain09 commented on a change in pull request #27539: [SPARK-30786] [CORE] Fix Block replication failure propogation issue in BlockManager URL: https://github.com/apache/spark/pull/27539#discussion_r377582780
########## File path: core/src/main/scala/org/apache/spark/network/netty/NettyBlockRpcServer.scala ########## @@ -105,7 +105,11 @@ class NettyBlockRpcServer( val blockId = BlockId(uploadBlock.blockId) logDebug(s"Receiving replicated block $blockId with level ${level} " + s"from ${client.getSocketAddress}") - blockManager.putBlockData(blockId, data, level, classTag) + val blockStored = blockManager.putBlockData(blockId, data, level, classTag) + if (!blockStored) { + throw new Exception(s"Upload block for $blockId failed. This " + Review comment: No. Raising this exception on remote block manager helps in invoking [onFailure callback](https://github.com/apache/spark/blob/v3.0.0-preview2-rc2/core/src/main/scala/org/apache/spark/network/netty/NettyBlockTransferService.scala#L179) on client block manager which inturn propogates to [replicate method](https://github.com/apache/spark/blob/v3.0.0-preview2-rc2/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L1626). And it retries to other peers for block replication after that. Raising exception here is just equivalent to "responseContext.ononFailure(e)". ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org