You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/11 09:39:48 UTC
[GitHub] [spark] prakharjain09 commented on a change in pull request #27539:
[SPARK-30786] [CORE] Fix Block replication failure propogation issue in
BlockManager
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_r377524849
##########
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 " +
+ s"mostly happens when there is not sufficient space available to store the block.")
+ }
Review comment:
Yes I initially used responseContext.ononFailure(e) only. The issue is that responseContext variable is not available in the streaming flow https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L669 . Also passing responseContext variable till that point will need interface changes in BlockDataManager#putBlockDataAsStream interface method. So we have to use exception in that flow. To make things consistent at both the places, I used exception here also. @Ngone51 Should we use responseContext.onFailure instead of exception here?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org