diff --git a/paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java b/paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java index f6ffd102c0ae..e78174db7ac9 100644 --- a/paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java +++ b/paimon-core/src/main/java/org/apache/paimon/operation/OrphanFilesClean.java @@ -476,7 +476,7 @@ private List filterAndCleanDataDirs( .forEach( p -> { deleteFileOrDirQuietly(p); - synchronized (this) { + synchronized (deleteFiles) { deleteFiles.add(p); deletedFilesNum++; }