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 2021/04/14 06:28:46 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #32114: [SPARK-35011][CORE] Avoid Block Manager registrations when StopExecutor msg is in-flight

Ngone51 commented on a change in pull request #32114:
URL: https://github.com/apache/spark/pull/32114#discussion_r612970148



##########
File path: core/src/main/scala/org/apache/spark/SparkEnv.scala
##########
@@ -355,6 +355,12 @@ object SparkEnv extends Logging {
 
     // Mapping from block manager id to the block manager's information.
     val blockManagerInfo = new concurrent.TrieMap[BlockManagerId, BlockManagerInfo]()
+    // Using a cache here since we only want to track recently removed executors to deny their
+    // block manager registration while their StopExecutor message is in-flight.
+    // Assuming average size of 6 bytes of execId and each entry in Cache taking around 64 bytes,
+    // max size of this cache = (6 + 64) * 30000 = 2.1MB
+    val recentlyRemovedExecutors = CacheBuilder.newBuilder().maximumSize(30000)
+      .build[String, String]()

Review comment:
       > Currently, on RemoveExecutor, we remove the corresponding BlockManagerInfo from blockManagerInfo map...
   
   As per https://github.com/apache/spark/pull/32114#issuecomment-819255421, I don't think there would be a `BlockManagerMessages.RemoveExecutor` raised in this PR case.
   
   Could you point out on which code path that the `BlockManagerMessages.RemoveExecutor` is raised? 
   
   If there's no more code path raises the `BlockManagerMessages.RemoveExecutor` in this PR case, then @attilapiros definitely works. But, I'd also suggest another idea in  https://github.com/apache/spark/pull/32114#issuecomment-819255421.




-- 
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



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