LuciferYang commented on code in PR #43371:
URL: https://github.com/apache/spark/pull/43371#discussion_r1360524390


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1887,33 +1881,45 @@ static void closeAllFilesAndDeleteIfNeeded(
         if (dataChannel.isOpen()) {
           dataChannel.close();
         }
-        if (delete) {
-          dataFile.delete();
-        }
       } catch (IOException ioe) {
         logger.warn("Error closing data channel for {} reduceId {}",
             appAttemptShuffleMergeId, reduceId);
       }
       try {
         metaFile.close();
-        if (delete) {
-          metaFile.delete();
-        }
       } catch (IOException ioe) {
         logger.warn("Error closing meta file for {} reduceId {}",
             appAttemptShuffleMergeId, reduceId);
         }
       try {
         indexFile.close();
-        if (delete) {
-          indexFile.delete();
-        }
       } catch (IOException ioe) {
         logger.warn("Error closing index file for {} reduceId {}",
             appAttemptShuffleMergeId, reduceId);
       }
     }
 
+    private void deleteAllFiles() {
+      try {
+        dataFile.delete();
+      } catch (Exception exception) {
+        logger.warn("Error deleting data file for {} reduceId {}",
+            appAttemptShuffleMergeId, reduceId);

Review Comment:
   +1



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to