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

    https://github.com/apache/spark/pull/11455#discussion_r55858792
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/master/Master.scala 
---
    @@ -368,6 +368,30 @@ private[deploy] class Master(
           if (canCompleteRecovery) { completeRecovery() }
         }
     
    +    case WorkerLatestState(workerId, executors, driverIds) =>
    +      idToWorker.get(workerId) match {
    +        case Some(worker) =>
    +          for (exec <- executors) {
    +            val executorMatches = worker.executors.exists {
    +              case (_, e) => e.application.id == exec.appId && e.id == 
exec.execId
    +            }
    +            if (!executorMatches) {
    +              // master doesn't recognize this executor. So just tell 
worker to kill it.
    +              worker.endpoint.send(KillExecutor(masterUrl, exec.appId, 
exec.execId))
    +            }
    +          }
    +
    +          for (driverId <- driverIds) {
    +            val driverMatches = worker.drivers.exists { case (id, _) => id 
== driverId }
    +            if (!driverMatches) {
    +              // master doesn't recognize this driver. So just tell worker 
to kill it.
    +              worker.endpoint.send(KillDriver(driverId))
    --- End diff --
    
    Looks like there may be scenario that Executor gets killed but driver gets 
kept, vice versa.
    
    Is that desirable ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to