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

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


The following commit(s) were added to 
refs/heads/cacheMetadataIndexNodeOffsetsForQuery by this push:
     new 9a6a973ecf0 remove other changes
9a6a973ecf0 is described below

commit 9a6a973ecf0bae8892bc41c26e593540f1629f04
Author: shuwenwei <[email protected]>
AuthorDate: Tue Jul 29 18:20:27 2025 +0800

    remove other changes
---
 .../fragment/DeviceMetadataIndexEntryCache.java    |  2 +-
 .../tablemodel/CompactionWithAllNullRowsTest.java  | 42 ----------------------
 2 files changed, 1 insertion(+), 43 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DeviceMetadataIndexEntryCache.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DeviceMetadataIndexEntryCache.java
index 874518dac1a..5211a5b3b9c 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DeviceMetadataIndexEntryCache.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DeviceMetadataIndexEntryCache.java
@@ -79,7 +79,7 @@ public class DeviceMetadataIndexEntryCache {
     if (deviceIndex < 0) {
       return new Pair<>(null, true);
     }
-    // not in cache
+    // not cached
     long[] resourceCache = loadOffsetsToCache(filePath);
     if (resourceCache == null) {
       return new Pair<>(null, true);
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/tablemodel/CompactionWithAllNullRowsTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/tablemodel/CompactionWithAllNullRowsTest.java
index 804326e39b5..a7c2d1cb289 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/tablemodel/CompactionWithAllNullRowsTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/tablemodel/CompactionWithAllNullRowsTest.java
@@ -43,10 +43,8 @@ import 
org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource;
 
 import org.apache.tsfile.exception.write.WriteProcessException;
 import org.apache.tsfile.file.metadata.IDeviceID;
-import org.apache.tsfile.file.metadata.MetadataIndexNode;
 import org.apache.tsfile.file.metadata.enums.CompressionType;
 import org.apache.tsfile.file.metadata.enums.TSEncoding;
-import org.apache.tsfile.read.TsFileSequenceReader;
 import org.apache.tsfile.read.common.TimeRange;
 import org.junit.After;
 import org.junit.Assert;
@@ -56,13 +54,9 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.stream.Collectors;
 
 @RunWith(Parameterized.class)
 public class CompactionWithAllNullRowsTest extends AbstractCompactionTest {
@@ -120,42 +114,6 @@ public class CompactionWithAllNullRowsTest extends 
AbstractCompactionTest {
     }
   }
 
-  @Test
-  public void test1() throws IOException {
-    TsFileResource resource =
-        new TsFileResource(
-            new File(
-                
"/Users/shuww/IdeaProjects/iotdb-versions/iotdb-master/data/datanode/data/sequence/db1/1/2892/1753182984040-1-0-0.tsfile"));
-    resource.deserialize();
-    List<IDeviceID> sortedDevices =
-        resource.getDevices().stream()
-            .sorted(IDeviceID::compareTo)
-            .distinct()
-            .collect(Collectors.toList());
-    long start = System.currentTimeMillis();
-    AtomicLong atomicLong = new AtomicLong(0);
-    try (TsFileSequenceReader reader = new 
TsFileSequenceReader(resource.getTsFilePath())) {
-      long[] offsets =
-          reader.getDeviceMetadataIndexNodeOffsets(
-              sortedDevices.get(0).getTableName(), sortedDevices, 
atomicLong::addAndGet);
-      for (int i = 0; i < sortedDevices.size(); i++) {
-        MetadataIndexNode metadataIndexNode =
-            reader.readMetadataIndexNode(offsets[2 * i], offsets[2 * i + 1], 
false);
-        reader.getAlignedChunkMetadataByMetadataIndexNode(
-            sortedDevices.get(i), metadataIndexNode, true);
-      }
-    }
-    System.out.println(System.currentTimeMillis() - start);
-    System.out.println(atomicLong.get());
-    start = System.currentTimeMillis();
-    try (TsFileSequenceReader reader = new 
TsFileSequenceReader(resource.getTsFilePath())) {
-      for (IDeviceID device : sortedDevices) {
-        reader.getAlignedChunkMetadata(device, false);
-      }
-    }
-    System.out.println(System.currentTimeMillis() - start);
-  }
-
   @Test
   public void testCompactionWithAllNullRows1() throws IOException {
     TsFileResource resource1 = createEmptyFileAndResource(true);

Reply via email to