Skip to content

fix bug

d1c35bb
Select commit
Loading
Failed to load commit list.
Open

Implement table & tree disk usage statistics #17169

fix bug
d1c35bb
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 13, 2026 in 3m 49s

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/tableDiskUsageCache/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

Check warning on line 1473 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Distance between variable 'size' declaration and its first usage is 7, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

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

Check warning on line 181 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/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=AZws5Lb2yBterSvoF6rx&open=AZws5Lb2yBterSvoF6rx&pullRequest=17169

Check warning on line 167 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

Use a primitive boolean expression here.

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

Check warning on line 119 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/tsfile/TsFileTableSizeCacheReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Distance between variable 'endOffsetInKeyFile' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove these unused method parameters "dataRegionWriter", "regionId".

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

Check warning on line 189 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/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 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/DefaultTableDiskUsageCacheProvider.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=AZws5LcnyBterSvoF6sV&open=AZws5LcnyBterSvoF6sV&pullRequest=17169

Check failure on line 474 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 57 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/CollectNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "clone" implementation; use a copy constructor or copy factory instead.

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

Check warning on line 1356 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

All overloaded methods should be placed next to each other. Placing non-overloaded methods in between overloaded methods with the same type is a violation. Previous overloaded method located at line '370'.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do something with the "boolean" value returned by "createNewFile".

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZws5Lb2yBterSvoF6rq&open=AZws5Lb2yBterSvoF6rq&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 98 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

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=AZws5Lc9yBterSvoF6se&open=AZws5Lc9yBterSvoF6se&pullRequest=17169

Check warning on line 1363 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 251 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/tsfile/TsFileTableSizeCacheReader.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 121 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/source/ShowDiskUsageNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use super.clone() to create and seed the cloned instance to be returned.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 33 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/object/EmptyObjectTableSizeCacheReader.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.

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

Check failure on line 62 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageCache/tsfile/TsFileTableDiskUsageCacheWriter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 113 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/ShowDiskUsageOperator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this instance-reference to a static reference.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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