codope commented on code in PR #5288:
URL: https://github.com/apache/hudi/pull/5288#discussion_r929897040


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/ListingBasedRollbackStrategy.java:
##########
@@ -239,7 +239,15 @@ private FileStatus[] 
fetchFilesFromCommitMetadata(HoodieInstant instantToRollbac
     SerializablePathFilter pathFilter = 
getSerializablePathFilter(baseFileExtension, instantToRollback.getTimestamp());
     Path[] filePaths = getFilesFromCommitMetadata(basePath, commitMetadata, 
partitionPath);
 
-    return fs.listStatus(filePaths, pathFilter);
+    return fs.listStatus(Arrays.stream(filePaths).filter(entry -> {
+      try {
+        return fs.exists(entry);
+      } catch (IOException e) {
+        LOG.error("Exists check failed for " + entry.toString(), e);
+      }
+      // if IOException is thrown, do not ignore. lets try to add the file of 
interest to be deleted. we can't miss any files to be rolled back.

Review Comment:
   This is a misleading comment. This PR intends to ignore files that have 
already been deleted by the cleaner and gracefully handle the FileNotFound/IO 
exception.
   @XuQianJin-Stars Since you reviewed this PR, can you validate my 
understanding?



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