This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new cd8f3db12a2 Fixed that InsertionCompactionSelection may skip a file
deleted by another compaction (#17254)
cd8f3db12a2 is described below
commit cd8f3db12a2d518c586edb9362f263b5a2c00ab1
Author: Jiang Tian <[email protected]>
AuthorDate: Wed Mar 4 18:38:50 2026 +0800
Fixed that InsertionCompactionSelection may skip a file deleted by another
compaction (#17254)
* 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);