turboFei commented on code in PR #3263:
URL: https://github.com/apache/celeborn/pull/3263#discussion_r2094127037


##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -106,6 +106,29 @@ class CelebornShuffleReader[K, C](
       }
     }
 
+    // Wait for the shuffle stage end before getting reducer file group.
+    var isShuffleStageEnd: Boolean = false
+    var getStageEndAttempts = 0
+    val getStageEndInterval = conf.clientRpcGetStageEndInterval
+    do {
+      if (getStageEndAttempts > 0) {
+        logInfo(
+          s"Attempting to wait shuffle $shuffleId stage end with interval 
$getStageEndInterval ms")
+        Thread.sleep(getStageEndInterval)
+      }
+      isShuffleStageEnd =
+        try {
+          shuffleClient.isShuffleStageEnd(shuffleId)
+        } catch {
+          case e: Exception =>
+            logError(s"Failed to check shuffle $shuffleId stage end, assume 
ended", e)

Review Comment:
   It should be fine to assume this,
   
   - the RPC is lightweight and retry with `clientRpcMaxRetries`.



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