Skip to content

Implement table & tree disk usage statistics - #17169

Merged
JackieTien97 merged 76 commits into
masterfrom
table_disk_usage_statistics_with_cache
Mar 18, 2026
Merged

JackieTien97 merged 76 commits into
masterfrom
table_disk_usage_statistics_with_cache

modify PlanNodeType

a5bd10e
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
SonarQubeCloud / SonarCloud Code Analysis failed Mar 17, 2026 in 3m 27s

Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/AbstractTableSizeIndexWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.storageengine.dataregion.utils.tableDiskUsageIndex' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPUQ3yI2Hoe52hUB&open=AZz2KPUQ3yI2Hoe52hUB&pullRequest=17169

Check warning on line 66 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/DataNodeLocationSupplierFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Local variable name 'tShowRegionResp' must match pattern '^[a-z]([a-z0-9][a-zA-Z0-9]*)?$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LieyBterSvoF6st&open=AZws5LieyBterSvoF6st&pullRequest=17169

Check failure on line 165 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableDiskUsageIndexWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LcGyBterSvoF6sE&open=AZws5LcGyBterSvoF6sE&pullRequest=17169

Check warning on line 197 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexFileWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Empty catch block.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6rz&open=AZws5Lb2yBterSvoF6rz&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/object/EmptyObjectTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LcbyBterSvoF6sP&open=AZws5LcbyBterSvoF6sP&pullRequest=17169

Check warning on line 204 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/DiskUsageStatisticUtil.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "break" statement or make it conditional.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lc9yBterSvoF6sg&open=AZws5Lc9yBterSvoF6sg&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/object/IObjectTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPUx3yI2Hoe52hUJ&open=AZz2KPUx3yI2Hoe52hUJ&pullRequest=17169

Check warning on line 258 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make tsFileID a static final constant or non-public and provide accessors if needed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb-yBterSvoF6r1&open=AZws5Lb-yBterSvoF6r1&pullRequest=17169

Check warning on line 68 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableDiskUsageIndexWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce the total number of break and continue statements in this loop to use at most one.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LcGyBterSvoF6sC&open=AZws5LcGyBterSvoF6sC&pullRequest=17169

Check warning on line 499 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 133).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPD73yI2Hoe52hT6&open=AZz2KPD73yI2Hoe52hT6&pullRequest=17169

Check warning on line 251 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this block of code, fill it in, or add a comment explaining why it is empty.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb-yBterSvoF6r6&open=AZws5Lb-yBterSvoF6r6&pullRequest=17169

Check warning on line 189 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexFileWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this block of code, fill it in, or add a comment explaining why it is empty.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6rt&open=AZws5Lb2yBterSvoF6rt&pullRequest=17169

Check warning on line 197 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexFileWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this block of code, fill it in, or add a comment explaining why it is empty.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6ru&open=AZws5Lb2yBterSvoF6ru&pullRequest=17169

Check warning on line 465 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/WritingMetrics.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "tableDiskUsageCacheBlockedRequestNumGauge" field and declare it as a local variable in the relevant methods.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LzsyBterSvoF6tM&open=AZws5LzsyBterSvoF6tM&pullRequest=17169

Check warning on line 189 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexFileWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Empty catch block.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6ry&open=AZws5Lb2yBterSvoF6ry&pullRequest=17169

Check warning on line 40 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/TableDiskUsageInformationSchemaTableScanNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Override the "equals" method in this class.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LjWyBterSvoF6sy&open=AZws5LjWyBterSvoF6sy&pullRequest=17169

Check warning on line 80 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPD73yI2Hoe52hT0&open=AZz2KPD73yI2Hoe52hT0&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/DefaultTableDiskUsageIndexProvider.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.storageengine.dataregion.utils.tableDiskUsageIndex' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPU53yI2Hoe52hUL&open=AZz2KPU53yI2Hoe52hUL&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb-yBterSvoF6r0&open=AZws5Lb-yBterSvoF6r0&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TimePartitionTableSizeQueryContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.storageengine.dataregion.utils.tableDiskUsageIndex' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPVC3yI2Hoe52hUM&open=AZz2KPVC3yI2Hoe52hUM&pullRequest=17169

Check warning on line 41 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TimePartitionTableSizeQueryContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Abbreviation in name 'tsFileIDOffsetInValueFileMap' must contain no more than '2' consecutive capital letters.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LcOyBterSvoF6sK&open=AZws5LcOyBterSvoF6sK&pullRequest=17169

Check warning on line 87 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 111).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZz2KPD73yI2Hoe52hT5&open=AZz2KPD73yI2Hoe52hT5&pullRequest=17169

Check warning on line 251 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Empty catch block.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb-yBterSvoF6r9&open=AZws5Lb-yBterSvoF6r9&pullRequest=17169

Check warning on line 4035 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename "isTableModel" which hides the field declared at line 384.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5LgOyBterSvoF6sp&open=AZws5LgOyBterSvoF6sp&pullRequest=17169

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexFileWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6rp&open=AZws5Lb2yBterSvoF6rp&pullRequest=17169