Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19041#discussion_r138761246
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala 
---
    @@ -120,6 +124,10 @@ class BlockManagerMasterEndpoint(
           removeExecutor(execId)
           context.reply(true)
     
    +    case ReplicateOneBlock(execId, blockId, exclude) =>
    +      logDebug(s"Replicating first block on $execId")
    +      context.reply(replicateOneBlock(execId, blockId, exclude))
    --- End diff --
    
    It's weird for an RPC (even if in this case it's actually a local call) to 
return a `Future`. Why not pass the `context` to `replicateOneBlock` and have 
it reply with the correct value when it's done?
    
    That would simplify the code for the sender of this message, too.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to