RexXiong commented on code in PR #2891:
URL: https://github.com/apache/celeborn/pull/2891#discussion_r1834020878


##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -210,10 +211,18 @@ class LifecycleManager(val appUniqueId: String, val conf: 
CelebornConf) extends
       appUniqueId,
       conf,
       masterClient,
-      () => commitManager.commitMetrics() -> 
shuffleFallbackCount.sumThenReset(),
+      () => {
+        commitManager.commitMetrics() ->
+          (shuffleCount.sumThenReset(), sumThenResetFallbackCounts())
+      },
       workerStatusTracker,
       registeredShuffle,
       reason => cancelAllActiveStages(reason))
+  private def sumThenResetFallbackCounts(): Map[String, java.lang.Long] = {
+    val fallbackCounts = shuffleFallbackCounts.asScala.filter(_._2 > 0L).toMap
+    shuffleFallbackCounts.clear()

Review Comment:
   The clear operation may result in the loss of the shuffleFallbackCount, as 
it will reset the fallback count that was just added.



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