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

jiangtian 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 a2991890a6d Fixed that InsertionCompactionSelection may skip a file 
deleted by another compaction (#17254) (#17259)
a2991890a6d is described below

commit a2991890a6dba0aaeb91499998b488fc6bc21b9b
Author: Jiang Tian <[email protected]>
AuthorDate: Fri Mar 6 14:02:33 2026 +0800

    Fixed that InsertionCompactionSelection may skip a file deleted by another 
compaction (#17254) (#17259)
    
    * Fixed that InsertionCompactionSelection may skip a file deleted by 
another compaction
    
    * Update
---
 .../selector/impl/RewriteCrossSpaceCompactionSelector.java          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java
index ffad8a487da..8439687a627 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java
@@ -490,6 +490,12 @@ public class RewriteCrossSpaceCompactionSelector 
implements ICrossSpaceSelector
             nextSeqFileIndex = Math.min(nextSeqFileIndex, i);
           }
           if (!seqFile.containsDevice(deviceId)) {
+            // if the seqFile is deleted by another compaction concurrently,
+            // we cannot ensure whether the seqFile overlaps with the 
unseqFile.
+            // Let a later selection retry with compacted file.
+            if (!seqFile.hasDetailedDeviceInfo()) {
+              return result;
+            }
             continue;
           }
           DeviceInfo seqDeviceInfo = seqFile.getDeviceInfoById(deviceId);

Reply via email to