This is an automated email from the ASF dual-hosted git repository.

justinchen pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new a0b4978f537 [To dev/1.3] Pipe: Fixed the bug that concurrent 
modification / compaction of the mod file may cause mod hard-link failure 
(#16044)
a0b4978f537 is described below

commit a0b4978f537474f9b3d81d0e021a90355b0a4ae1
Author: Caideyipi <[email protected]>
AuthorDate: Mon Jul 28 17:17:00 2025 +0800

    [To dev/1.3] Pipe: Fixed the bug that concurrent modification / compaction 
of the mod file may cause mod hard-link failure (#16044)
    
    * mod
    
    * fix
---
 .../iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java
index fd74dadac5e..2bc3ebf12dc 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java
@@ -352,7 +352,10 @@ public class PipeTsFileResourceManager {
       throws IOException {
     increaseFileReference(resource.getTsFile(), true, pipeName);
     if (withMods && resource.getModFile().exists()) {
-      increaseFileReference(new File(resource.getModFile().getFilePath()), 
false, pipeName);
+      // Avoid mod compaction
+      synchronized (resource.getModFile()) {
+        increaseFileReference(new File(resource.getModFile().getFilePath()), 
false, pipeName);
+      }
     }
   }
 

Reply via email to