Skip to content

Add CorruptedTsFileException for TsFile corruption errors with file path#18304

Open
shuwenwei wants to merge 4 commits into
masterfrom
tsfile-corruption-error-message
Open

Add CorruptedTsFileException for TsFile corruption errors with file path#18304
shuwenwei wants to merge 4 commits into
masterfrom
tsfile-corruption-error-message

fix bug

a41de95
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 24, 2026 in 9m 15s

Quality Gate failed

Failed conditions
E 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 143 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxGXpXjFugKaiQOwk&open=AZ-TxGXpXjFugKaiQOwk&pullRequest=18304

Check warning on line 3420 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Cast one of the operands of this addition operation to a "long".

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHH0XjFugKaiQOxI&open=AZ-TxHH0XjFugKaiQOxI&pullRequest=18304

Check warning on line 1247 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof ConfigTableNode configtablenode'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHU1XjFugKaiQOxR&open=AZ-TxHU1XjFugKaiQOxR&pullRequest=18304

Check warning on line 327 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.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=AZ-TxG9uXjFugKaiQOw8&open=AZ-TxG9uXjFugKaiQOw8&pullRequest=18304

Check failure on line 2828 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Fix this access that will throw a NullPointerException when executed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHNvXjFugKaiQOxO&open=AZ-TxHNvXjFugKaiQOxO&pullRequest=18304

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected @throws tag for 'CorruptedTsFileException'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG2KXjFugKaiQOwt&open=AZ-TxG2KXjFugKaiQOwt&pullRequest=18304

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof DiskChunkLoader diskchunkloader'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG3WXjFugKaiQOw0&open=AZ-TxG3WXjFugKaiQOw0&pullRequest=18304

Check warning on line 1196 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 75 to 64, Complexity from 15 to 14, Nesting Level from 5 to 2, Number of Variables from 11 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHU1XjFugKaiQOxS&open=AZ-TxHU1XjFugKaiQOxS&pullRequest=18304

Check warning on line 115 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 130).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHclXjFugKaiQOxd&open=AZ-TxHclXjFugKaiQOxd&pullRequest=18304

Check warning on line 60 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RestRequestBodyMemoryManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this method into "Reservation".

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHYvXjFugKaiQOxW&open=AZ-TxHYvXjFugKaiQOxW&pullRequest=18304

Check failure on line 62 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RequestSizeLimitFilter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use try-with-resources or close this "Reservation" in a "finally" clause.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHZJXjFugKaiQOxX&open=AZ-TxHZJXjFugKaiQOxX&pullRequest=18304

Check warning on line 52 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/ExceptionHandler.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof QueryProcessException queryprocessexception'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHZnXjFugKaiQOxa&open=AZ-TxHZnXjFugKaiQOxa&pullRequest=18304

Check warning on line 109 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RequestSizeLimitFilter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 197).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHZJXjFugKaiQOxZ&open=AZ-TxHZJXjFugKaiQOxZ&pullRequest=18304

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected @throws tag for 'CorruptedTsFileException'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG2KXjFugKaiQOwv&open=AZ-TxG2KXjFugKaiQOwv&pullRequest=18304

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 151).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG2KXjFugKaiQOwu&open=AZ-TxG2KXjFugKaiQOwu&pullRequest=18304

Check warning on line 54 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RestRequestBodyMemoryManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof Reservation reservation'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHYvXjFugKaiQOxV&open=AZ-TxHYvXjFugKaiQOxV&pullRequest=18304

Check failure on line 224 in iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal " please check the logs for the corrupted file path." 4 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHOqXjFugKaiQOxP&open=AZ-TxHOqXjFugKaiQOxP&pullRequest=18304

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 147).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG3WXjFugKaiQOw3&open=AZ-TxG3WXjFugKaiQOw3&pullRequest=18304

Check warning on line 675 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ExternalTsFileQueryResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested try block into a separate method.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxGzPXjFugKaiQOwp&open=AZ-TxGzPXjFugKaiQOwp&pullRequest=18304

Check warning on line 135 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' and ensure that the list is unmodified.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHDVXjFugKaiQOxC&open=AZ-TxHDVXjFugKaiQOxC&pullRequest=18304

Check warning on line 804 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.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=AZ-TxG_ZXjFugKaiQOxA&open=AZ-TxG_ZXjFugKaiQOxA&pullRequest=18304

Check warning on line 1260 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Method has 10 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxGwGXjFugKaiQOwm&open=AZ-TxGwGXjFugKaiQOwm&pullRequest=18304

Check failure on line 2147 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG3WXjFugKaiQOw2&open=AZ-TxG3WXjFugKaiQOw2&pullRequest=18304

Check warning on line 3549 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use an "AtomicInteger" for this field; its operations are atomic.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHH0XjFugKaiQOxJ&open=AZ-TxHH0XjFugKaiQOxJ&pullRequest=18304

Check warning on line 812 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "java.util.Random.nextLong()" instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxG_ZXjFugKaiQOxB&open=AZ-TxG_ZXjFugKaiQOxB&pullRequest=18304