SteNicholas commented on code in PR #2711:
URL: https://github.com/apache/celeborn/pull/2711#discussion_r1767900586


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Worker.scala:
##########
@@ -907,15 +907,18 @@ private[celeborn] class Worker(
 
     def waitTime: Long = waitTimes * interval
 
-    while (!storageManager.shuffleKeySet().isEmpty && waitTime < timeout) {
+    val unreleasedShuffleKeys = storageManager.shuffleKeySet()
+    while (!unreleasedShuffleKeys.isEmpty && waitTime < timeout) {
       Thread.sleep(interval)
       waitTimes += 1
     }
-    if (storageManager.shuffleKeySet().isEmpty) {
+
+    if (unreleasedShuffleKeys.isEmpty) {
       logInfo(s"Waiting for all shuffle expired cost ${waitTime}ms.")
     } else {
       logWarning(s"Waiting for all shuffle expired cost ${waitTime}ms, " +
-        s"unreleased shuffle: 
\n${storageManager.shuffleKeySet().asScala.mkString("[", ", ", "]")}")
+        s"unreleased shuffle: \n${unreleasedShuffleKeys.asScala.mkString("[", 
", ", "]")}")
+      workerSource.incCounter(UNRELEASED_SHUFFLE_COUNT, 
unreleasedShuffleKeys.size)

Review Comment:
   > If a worker is decommissioned, the worker will be shut down. Using a gauge 
here will be reasonable. The metric won't be increasing because the worker is 
gone.
   
   @s0nskar, wdyt?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to