Ngone51 commented on a change in pull request #27017: [SPARK-30359][CORE] Do 
not clear executorsPendingToRemove in CoarseGrainedSchedulerBackend.reset 
URL: https://github.com/apache/spark/pull/27017#discussion_r361590036
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
 ##########
 @@ -506,6 +506,7 @@ class CoarseGrainedSchedulerBackend(scheduler: 
TaskSchedulerImpl, val rpcEnv: Rp
     executors.foreach { eid =>
       removeExecutor(eid, SlaveLost("Stale executor after cluster manager 
re-registered."))
     }
+    synchronized { executorsPendingToRemove.clear() }
 
 Review comment:
   `removeExecutor()` is asynchronous, so clear `executorsPendingToRemove` at 
the end of `reset()` can not work. We should revert this.

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

Reply via email to