mridulm commented on a change in pull request #33028:
URL: https://github.com/apache/spark/pull/33028#discussion_r657640037



##########
File path: 
core/src/main/scala/org/apache/spark/deploy/worker/WorkerWatcher.scala
##########
@@ -53,10 +53,9 @@ private[spark] class WorkerWatcher(
   private def exitNonZero() =
     if (isTesting) {
       isShutDown = true
-    } else {
-      ThreadUtils.awaitResult(Future {
-        System.exit(-1)
-      }, 5.seconds)
+    } else if (isChildProcessStopping.compareAndSet(false, true)) {

Review comment:
       ~~We will need to modify exit behavior in `CoarseGrainedExecutorBackend` 
also to ensure atomic compare + set to prevent races, right ? (in 
`onDisconnected`)~~
   
   Changes to exitExecutor below does the job.
   One question though - we have `stopping` updated directly to `true` for 
`StopExecutor` and `Shutdown` case - will this prevent an `exit` in 
`WorkerWatcher` ?




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