jiangxb1987 commented on a change in pull request #27306: [SPARK-30594][CORE]
Do not post SparkListenerBlockUpdated when updateBlockInfo returns false
URL: https://github.com/apache/spark/pull/27306#discussion_r369860024
##########
File path:
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
##########
@@ -98,8 +98,15 @@ class BlockManagerMasterEndpoint(
case _updateBlockInfo @
UpdateBlockInfo(blockManagerId, blockId, storageLevel,
deserializedSize, size) =>
- context.reply(updateBlockInfo(blockManagerId, blockId, storageLevel,
deserializedSize, size))
-
listenerBus.post(SparkListenerBlockUpdated(BlockUpdatedInfo(_updateBlockInfo)))
+ val succeed = updateBlockInfo(blockManagerId, blockId, storageLevel,
deserializedSize, size)
+ context.reply(succeed)
+ // SPARK-30594: we should not post `SparkListenerBlockUpdated` when
updateBlockInfo
Review comment:
nit: Just say we shouldn't post the event when the result is false because
the block info would be updated again later.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]