You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/11/30 14:57:38 UTC

[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1034: [CELEBORN-76][FOLLOWUP] fix inFlightCommitRequest counting problem

waitinfuture commented on code in PR #1034:
URL: https://github.com/apache/incubator-celeborn/pull/1034#discussion_r1036062236


##########
client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala:
##########
@@ -293,57 +294,67 @@ class LifecycleManager(appId: String, val conf: CelebornConf) extends RpcEndpoin
                               .add(commitPartitionRequest.partition.getPeer)
                           }
                         }
-                        currentBatch
+
+                        if (currentBatch.nonEmpty) {
+                          logWarning(s"Commit current batch HARD_SPLIT partitions for $shuffleId: " +
+                            s"${currentBatch.map(_.partition.getUniqueId).mkString("[", ",", "]")}")
+                          val workerToRequests = currentBatch.flatMap { request =>
+                            if (request.partition.getPeer != null) {
+                              Seq(request.partition, request.partition.getPeer)
+                            } else {
+                              Seq(request.partition)
+                            }
+                          }.groupBy(_.getWorker)
+                          shuffleCommittedInfo.inFlightCommitRequest.addAndGet(
+                            workerToRequests.size)
+                          return workerToRequests

Review Comment:
   prefer not to use return, just add a else block surrounding Map.empty



-- 
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: dev-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org