This is an automated email from the ASF dual-hosted git repository.
wombatukun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new d1d2f7cc7c1 [HUDI-9009] Fix potential race condition when listing
files by leveraging exception type #12834
d1d2f7cc7c1 is described below
commit d1d2f7cc7c1c641bc8b4a77d6497536f2e4b7bfa
Author: Tim Brown <[email protected]>
AuthorDate: Thu Feb 13 01:09:16 2025 -0600
[HUDI-9009] Fix potential race condition when listing files by leveraging
exception type #12834
---
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
b/hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
index 06a5b775eb5..9edc1729dc0 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
@@ -481,13 +481,9 @@ public class FSUtils {
String extension = FSUtils.getFileExtension(path.getName());
return validFileExtensions.contains(extension) ||
path.getName().contains(logFileExtension);
}).stream().filter(StoragePathInfo::isFile).collect(Collectors.toList());
- } catch (IOException e) {
+ } catch (FileNotFoundException ex) {
// return empty FileStatus if partition does not exist already
- if (!storage.exists(partitionPath)) {
- return Collections.emptyList();
- } else {
- throw e;
- }
+ return Collections.emptyList();
}
}