[HUDI-3848] Fixing restore with cleaned up commits (#5288)
This commit is contained in:
committed by
GitHub
parent
9e8664f4d2
commit
57612c5c32
@@ -239,7 +239,15 @@ public class ListingBasedRollbackStrategy implements BaseRollbackPlanActionExecu
|
||||
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.
|
||||
return false;
|
||||
}).toArray(Path[]::new), pathFilter);
|
||||
}
|
||||
|
||||
private FileStatus[] fetchFilesFromListFiles(HoodieInstant instantToRollback, String partitionPath, String basePath,
|
||||
|
||||
Reference in New Issue
Block a user