You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by zh...@apache.org on 2023/04/03 08:37:50 UTC

[incubator-celeborn] branch main updated: [CELEBORN-484][FOLLOWUP] Return shutting worker is empty also need to retain LifecycleManager's shutting workers (#1403)

This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 015788dd2 [CELEBORN-484][FOLLOWUP] Return shutting worker is empty also need to retain LifecycleManager's shutting workers (#1403)
015788dd2 is described below

commit 015788dd283cd0e820f4347e6c9b78d6bc7b4fd8
Author: Angerszhuuuu <an...@gmail.com>
AuthorDate: Mon Apr 3 16:37:46 2023 +0800

    [CELEBORN-484][FOLLOWUP] Return shutting worker is empty also need to retain LifecycleManager's shutting workers (#1403)
---
 .../org/apache/celeborn/client/LifecycleManager.scala    | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
index b9e3f44f1..fec09f2f5 100644
--- a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
+++ b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
@@ -1237,15 +1237,13 @@ class LifecycleManager(appId: String, val conf: CelebornConf) extends RpcEndpoin
   }
 
   private def resolveShutdownWorkers(newShutdownWorkers: JList[WorkerInfo]): Unit = {
-    if (!newShutdownWorkers.isEmpty) {
-      // shutdownWorkers only retain workers appeared in response.
-      shuttingWorkers.retainAll(newShutdownWorkers)
-      newShutdownWorkers.asScala.filterNot(shuttingWorkers.asScala.contains)
-        .foreach { workerInfo =>
-          commitManager.handleShutdownWorker(workerInfo)
-        }
-      shuttingWorkers.addAll(newShutdownWorkers)
-    }
+    // shutdownWorkers only retain workers appeared in response.
+    shuttingWorkers.retainAll(newShutdownWorkers)
+    newShutdownWorkers.asScala.filterNot(shuttingWorkers.asScala.contains)
+      .foreach { workerInfo =>
+        commitManager.handleShutdownWorker(workerInfo)
+      }
+    shuttingWorkers.addAll(newShutdownWorkers)
   }
 
   private def shuffleResourceExists(shuffleId: Int): Boolean = {