You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2026/03/05 01:50:35 UTC
(iotdb) 01/01: Fixed that InsertionCompactionSelection may skip a file deleted by another compaction (#17254)
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch fix_compaction_1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 15cde0d64529502a828a5c680f90308f8c491f00
Author: Jiang Tian <jt...@163.com>
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);