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

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


The following commit(s) were added to 
refs/heads/table_disk_usage_statistics_with_cache by this push:
     new 07246a89689 fix
07246a89689 is described below

commit 07246a8968965f676f92ef90f85d499d0ed05261
Author: shuwenwei <[email protected]>
AuthorDate: Thu Feb 5 11:32:00 2026 +0800

    fix
---
 .../apache/iotdb/db/queryengine/plan/analyze/Analysis.java  |  8 +++-----
 .../iotdb/db/queryengine/plan/execution/QueryExecution.java |  5 ++---
 .../storageengine/dataregion/utils/TableDiskUsageTest.java  | 13 +++++--------
 .../dataregion/utils/TsFileTableSizeCacheWriterTest.java    |  3 +--
 4 files changed, 11 insertions(+), 18 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java
index 92462e45f3c..ec1bdeed0c6 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java
@@ -509,11 +509,9 @@ public class Analysis implements IAnalysis {
 
   @Override
   public boolean needSetHighestPriority() {
-    // if is this Statement is ShowQueryStatement or ShowDiskUsageStatement, 
set its instances to
-    // the highest priority, so
-    // that the sub-tasks of the instances could be executed first.
-    return StatementType.SHOW_QUERIES.equals(statement.getType())
-        || StatementType.SHOW_DISK_USAGE.equals(statement.getType());
+    // if is this Statement is ShowQueryStatement, set its instances to the 
highest priority, so
+    // that the sub-tasks of the ShowQueries instances could be executed first.
+    return StatementType.SHOW_QUERIES.equals(statement.getType());
   }
 
   @Override
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java
index 59cc939b72c..581f4ee6c56 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java
@@ -286,9 +286,8 @@ public class QueryExecution implements IQueryExecution {
   public void doDistributedPlan() {
     this.distributedPlan = planner.doDistributionPlan(analysis, logicalPlan, 
context);
 
-    // if is this Statement is ShowQueryStatement or ShowDiskUsageStatement, 
set its instances to
-    // the highest priority, so
-    // that the sub-tasks of the instances could be executed first.
+    // if is this Statement is ShowQueryStatement, set its instances to the 
highest priority, so
+    // that the sub-tasks of the ShowQueries instances could be executed first.
     if (analysis.needSetHighestPriority()) {
       distributedPlan.getInstances().forEach(instance -> 
instance.setHighestPriority(true));
     }
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TableDiskUsageTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TableDiskUsageTest.java
index ce390308551..41be39dfe88 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TableDiskUsageTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TableDiskUsageTest.java
@@ -257,15 +257,12 @@ public class TableDiskUsageTest extends 
AbstractCompactionTest {
     TableDiskUsageCacheReader reader =
         new TableDiskUsageCacheReader(mockDataRegion, queryContext, false);
     try {
-      Assert.assertTrue(reader.prepareCacheReader(System.currentTimeMillis(), 
Long.MAX_VALUE));
+      Assert.assertTrue(reader.prepareCacheReader(System.nanoTime(), 
Long.MAX_VALUE));
+      Assert.assertTrue(reader.loadObjectFileTableSizeCache(System.nanoTime(), 
Long.MAX_VALUE));
+      Assert.assertTrue(reader.prepareCachedTsFileIDKeys(System.nanoTime(), 
Long.MAX_VALUE));
+      Assert.assertTrue(reader.checkAllFilesInTsFileManager(System.nanoTime(), 
Long.MAX_VALUE));
       Assert.assertTrue(
-          reader.loadObjectFileTableSizeCache(System.currentTimeMillis(), 
Long.MAX_VALUE));
-      Assert.assertTrue(
-          reader.prepareCachedTsFileIDKeys(System.currentTimeMillis(), 
Long.MAX_VALUE));
-      Assert.assertTrue(
-          reader.checkAllFilesInTsFileManager(System.currentTimeMillis(), 
Long.MAX_VALUE));
-      Assert.assertTrue(
-          
reader.readCacheValueFilesAndUpdateResultMap(System.currentTimeMillis(), 
Long.MAX_VALUE));
+          reader.readCacheValueFilesAndUpdateResultMap(System.nanoTime(), 
Long.MAX_VALUE));
     } finally {
       reader.close();
     }
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileTableSizeCacheWriterTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileTableSizeCacheWriterTest.java
index 4b8dba43e44..3f2f7eec2e1 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileTableSizeCacheWriterTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileTableSizeCacheWriterTest.java
@@ -229,8 +229,7 @@ public class TsFileTableSizeCacheWriterTest extends 
AbstractCompactionTest {
     Assert.assertFalse(reader.hasNextEntryInKeyFile());
     reader.closeCurrentFile();
     reader.openValueFile();
-    reader.readFromValueFile(
-        offsets.iterator(), context, System.currentTimeMillis(), 
Long.MAX_VALUE);
+    reader.readFromValueFile(offsets.iterator(), context, System.nanoTime(), 
Long.MAX_VALUE);
     reader.closeCurrentFile();
     System.out.println("cost: " + (System.currentTimeMillis() - start) + "ms");
     System.out.println("keyFileLength: " + keyFile.length());

Reply via email to