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



##########
File path: 
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
##########
@@ -465,72 +464,50 @@ class CoarseGrainedSchedulerBackend(scheduler: 
TaskSchedulerImpl, val rpcEnv: Rp
    * @param executorsAndDecomInfo Identifiers of executors & decommission info.
    * @param adjustTargetNumExecutors whether the target number of executors 
will be adjusted down
    *                                 after these executors have been 
decommissioned.
+   * @param triggeredByExecutor whether the decommission is triggered at 
executor.
    * @return the ids of the executors acknowledged by the cluster manager to 
be removed.
    */
   override def decommissionExecutors(
       executorsAndDecomInfo: Array[(String, ExecutorDecommissionInfo)],
-      adjustTargetNumExecutors: Boolean): Seq[String] = {
-
+      adjustTargetNumExecutors: Boolean,
+      triggeredByExecutor: Boolean): Seq[String] = withLock {

Review comment:
       > Not 100% sure, but I do remember that the locking mechanism withLock 
did manage to deadlock before
   
   Yeah. We need to avoid the deadlock now because we need both 
CoarseGrainedSchedulerBackend's lock and TaskSchedulerImpl's lock within the 
same code block. 
   
   
   > it might be good to add a logging statement in here that verifies this 
block is called in the integration test.
   
   Updated the logs and the integration test.
   




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to