You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/21 22:18:34 UTC

[GitHub] [hudi] vinothchandar commented on a diff in pull request #5288: [HUDI-3848] Fixing restore with cleaned up commits

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


##########
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:
   @nsivabalan does n't the line above just ignore the IOException? Why would fs.listStatus() return stuff that does not exist?



-- 
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: commits-unsubscribe@hudi.apache.org

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