Skip to content

Add CorruptedTsFileException for TsFile corruption errors with file path#18304

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

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

fix review comments

5a3f91d
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 27, 2026 in 8m 28s

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

Check warning on line 53 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/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-TxHbcXjFugKaiQOxb&open=AZ-TxHbcXjFugKaiQOxb&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 failure on line 2704 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-TxHNvXjFugKaiQOxN&open=AZ-TxHNvXjFugKaiQOxN&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 190 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/SchemaEngine.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHGjXjFugKaiQOxH&open=AZ-TxHGjXjFugKaiQOxH&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 failure on line 1523 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

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=AZ-TxHDVXjFugKaiQOxF&open=AZ-TxHDVXjFugKaiQOxF&pullRequest=18304

Check warning on line 283 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-TxG2KXjFugKaiQOww&open=AZ-TxG2KXjFugKaiQOww&pullRequest=18304

Check warning on line 705 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 DiskAlignedChunkLoader diskalignedchunkloader'

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

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

Replace this instanceof check and cast with 'instanceof DiskAlignedChunkLoader diskalignedchunkloader'

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof LocalDate[] localdateArray'

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

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

Line is longer than 100 characters (found 120).

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

Check warning on line 419 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 121).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ-TxHX4XjFugKaiQOxU&open=AZ-TxHX4XjFugKaiQOxU&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 97 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/IMemTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Summary javadoc is missing.

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

Check warning on line 181 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 172 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 1145 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

Remove this unnecessary cast to "long".

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

Check warning on line 531 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-TxG2KXjFugKaiQOwx&open=AZ-TxG2KXjFugKaiQOwx&pullRequest=18304

Check warning on line 192 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

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

Check warning on line 335 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 warning on line 89 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/AbstractDriverThread.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof CorruptedTsFileException corruptedTsFileException'

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

Check failure 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

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

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