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


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/TierWriter.scala:
##########
@@ -643,13 +643,41 @@ class DfsTierWriter(
       hadoopFs.delete(hdfsFileInfo.getDfsPath, false)
       deleted = true
     } else {
-      hadoopFs.create(hdfsFileInfo.getDfsWriterSuccessPath).close()
-      val indexOutputStream = hadoopFs.create(hdfsFileInfo.getDfsIndexPath)
-      
indexOutputStream.writeInt(hdfsFileInfo.getReduceFileMeta.getChunkOffsets.size)
-      for (offset <- hdfsFileInfo.getReduceFileMeta.getChunkOffsets.asScala) {
-        indexOutputStream.writeLong(offset)
+      def retry(operationName: String)(action: => Unit): Unit = {
+        var retryCount = 0
+        val maxAttempts = conf.workerCreateIndexOrSuccessMaxAttempts
+        var success = false
+
+        while (retryCount < maxAttempts && !success) {
+          try {
+            action
+            success = true
+          } catch {
+            case e: IOException =>
+              retryCount += 1

Review Comment:
   should throw IOException when reach the retry limit?



-- 
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: issues-unsubscr...@celeborn.apache.org

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

Reply via email to