You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:21:58 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #32868: [SPARK-35714][CORE] Bug fix for deadlock during the executor shutdown

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



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/WorkerWatcher.scala
##########
@@ -45,7 +50,14 @@ private[spark] class WorkerWatcher(
   private val expectedAddress = RpcAddress.fromURIString(workerUrl)
   private def isWorker(address: RpcAddress) = expectedAddress == address
 
-  private def exitNonZero() = if (isTesting) isShutDown = true else System.exit(-1)
+  private def exitNonZero() =
+    if (isTesting) {
+      isShutDown = true
+    } else {
+      ThreadUtils.awaitResult(Future {

Review comment:
       Maybe, using a global flag between `WorkerWatcher` and `CoarseGrainedExecutorBackend` to indicate whether `System.exit` has been called? 




-- 
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:
users@infra.apache.org



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