attilapiros commented on a change in pull request #29014:
URL: https://github.com/apache/spark/pull/29014#discussion_r457402821



##########
File path: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -912,13 +914,39 @@ private[spark] class TaskSchedulerImpl(
     }
   }
 
-  override def executorDecommission(executorId: String): Unit = {
+  override def executorDecommission(
+      executorId: String, decommissionInfo: ExecutorDecommissionInfo): Unit = {
+    synchronized {

Review comment:
       ~~Is there a reason to use the lock on the whole `TaskSchedulerImpl` 
instance? If there is none then we can change the `HashMap` to a 
`ConcurrentHashMap` and here we can use a `putIfAbsent`.~~
   




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



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

Reply via email to