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

shuwenwei pushed a commit to branch object_type
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/object_type by this push:
     new 21851d1ef47 fix bug
21851d1ef47 is described below

commit 21851d1ef47963eeb998532f1df5acb9984a5707
Author: shuwenwei <[email protected]>
AuthorDate: Wed Jul 9 18:00:07 2025 +0800

    fix bug
---
 .../compaction/execute/performer/impl/FastCompactionPerformer.java    | 3 +--
 .../compaction/execute/utils/MultiTsFileDeviceIterator.java           | 4 +++-
 .../utils/executor/fast/FastAlignedSeriesCompactionExecutor.java      | 4 +++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java
index e970b07f2f4..ce79e0a8334 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java
@@ -142,8 +142,7 @@ public class FastCompactionPerformer
         sortedSourceFiles.addAll(unseqFiles);
         boolean isTreeModel = !isAligned || 
device.getTableName().startsWith("root.");
         long ttl = deviceIterator.getTTLForCurrentDevice();
-        sortedSourceFiles.removeIf(
-            x -> x.definitelyNotContains(device) || !x.isDeviceAlive(device, 
ttl));
+        sortedSourceFiles.removeIf(x -> x.definitelyNotContains(device));
         // checked above
         //noinspection OptionalGetWithoutIsPresent
         sortedSourceFiles.sort(Comparator.comparingLong(x -> 
x.getStartTime(device).get()));
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/MultiTsFileDeviceIterator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/MultiTsFileDeviceIterator.java
index 450affc17b7..b3659de084a 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/MultiTsFileDeviceIterator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/MultiTsFileDeviceIterator.java
@@ -46,6 +46,7 @@ import org.apache.tsfile.write.schema.MeasurementSchema;
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -477,11 +478,12 @@ public class MultiTsFileDeviceIterator implements 
AutoCloseable {
     }
 
     if (ttlDeletion != null) {
+      List<ModEntry> emptyList = Collections.emptyList();
       CompactionUtils.removeDeletedObjectFiles(
           readerMap.get(tsFileResource),
           alignedChunkMetadataList,
           Collections.singletonList(ttlDeletion),
-          Collections.emptyList());
+          modificationForValueColumns.stream().map(v -> 
emptyList).collect(Collectors.toList()));
     }
 
     ModificationUtils.modifyAlignedChunkMetaData(
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/FastAlignedSeriesCompactionExecutor.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/FastAlignedSeriesCompactionExecutor.java
index 3bb42fa8bdf..4e28306ebec 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/FastAlignedSeriesCompactionExecutor.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/FastAlignedSeriesCompactionExecutor.java
@@ -65,6 +65,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 public class FastAlignedSeriesCompactionExecutor extends 
SeriesCompactionExecutor {
 
@@ -274,11 +275,12 @@ public class FastAlignedSeriesCompactionExecutor extends 
SeriesCompactionExecuto
         ModEntry ttlDeletion =
             CompactionUtils.convertTtlToDeletion(
                 deviceId, CommonDateTimeUtils.currentTime() - ttlForTable);
+        List<ModEntry> emptyList = Collections.emptyList();
         CompactionUtils.removeDeletedObjectFiles(
             readerCacheMap.get(resource),
             alignedChunkMetadataList,
             Collections.singletonList(ttlDeletion),
-            Collections.emptyList());
+            valueModifications.stream().map(v -> 
emptyList).collect(Collectors.toList()));
       }
 
       // modify aligned chunk metadatas

Reply via email to