Ngone51 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_r375100365
########## File path: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ########## @@ -1693,6 +1696,16 @@ class BlockManagerSuite extends SparkFunSuite with Matchers with BeforeAndAfterE assert(locs(blockIds(0)) == expectedLocs) } + test("SPARK-30594: Do not post SparkListenerBlockUpdated when updateBlockInfo returns false") { + // update block info for non-existent block manager + val updateInfo = UpdateBlockInfo(BlockManagerId("1", "host1", 100), + BlockId("test_1"), StorageLevel.MEMORY_ONLY, 1, 1) + val result = master.driverEndpoint.askSync[Boolean](updateInfo) Review comment: Because the `BlockManagerId("1", "host1", 100)` hasn't registered at driver. And driver will response `false` for the block from a non-existent block manager. ---------------------------------------------------------------- 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