Skip to content

[Query] Fix scheduler stop races and query attempt context leaks - #19224

Open
JackieTien97 wants to merge 1 commit into
masterfrom
ty/query-attempt-cleanup
Open

JackieTien97 wants to merge 1 commit into
masterfrom
ty/query-attempt-cleanup

[Query] Fix scheduler stop races and query attempt context leaks

0030ac2
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Nov 11, 2026 in 4m 32s

Quality Gate failed

Failed conditions
B 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 failure on line 4821 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-sSroe4nojaYRvRQ&open=AaHJ-sSroe4nojaYRvRQ&pullRequest=19224

Check warning on line 181 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wj9oe4nojaYRvSG&open=AaHJ-wj9oe4nojaYRvSG&pullRequest=19224

Check warning on line 181 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wj9oe4nojaYRvSF&open=AaHJ-wj9oe4nojaYRvSF&pullRequest=19224

Check warning on line 153 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.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=AaHJ-tQCoe4nojaYRvRf&open=AaHJ-tQCoe4nojaYRvRf&pullRequest=19224

Check warning on line 150 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wesoe4nojaYRvSD&open=AaHJ-wesoe4nojaYRvSD&pullRequest=19224

Check warning on line 78 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use an "AtomicLongArray" instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-sgxoe4nojaYRvRT&open=AaHJ-sgxoe4nojaYRvRT&pullRequest=19224

Check failure on line 313 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotLoader.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=AaHJ-sLHoe4nojaYRvRP&open=AaHJ-sLHoe4nojaYRvRP&pullRequest=19224

Check warning on line 155 in iotdb-client/cli/src/main/java/org/apache/iotdb/tool/schema/ImportSchemaTree.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 157).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-w3Hoe4nojaYRvSP&open=AaHJ-w3Hoe4nojaYRvSP&pullRequest=19224

Check warning on line 125 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/processor/PipeProcessorSubtaskWorker.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Single-line Javadoc comment should be multi-line.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-utsoe4nojaYRvRw&open=AaHJ-utsoe4nojaYRvRw&pullRequest=19224

Check warning on line 19 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryAttemptId.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'package' should be separated from previous line.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-uUYoe4nojaYRvRt&open=AaHJ-uUYoe4nojaYRvRt&pullRequest=19224

Check warning on line 337 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected @throws tag for 'FileNotFoundException'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-sBToe4nojaYRvRN&open=AaHJ-sBToe4nojaYRvRN&pullRequest=19224

Check failure on line 42 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/execution/PipeProcessorSubtaskExecutor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this usage of "super", it is annotated with @VisibleForTesting and should not be accessed from production code.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-uw0oe4nojaYRvRy&open=AaHJ-uw0oe4nojaYRvRy&pullRequest=19224

Check warning on line 236 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-sgxoe4nojaYRvRV&open=AaHJ-sgxoe4nojaYRvRV&pullRequest=19224

Check warning on line 28 in iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcServiceConstants.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'}' at column 34 should be alone on a line.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-waaoe4nojaYRvSA&open=AaHJ-waaoe4nojaYRvSA&pullRequest=19224

Check warning on line 23 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/InternalClientRPCServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-uawoe4nojaYRvRu&open=AaHJ-uawoe4nojaYRvRu&pullRequest=19224

Check warning on line 250 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof IoTDBRuntimeException iotdbruntimeexception'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-t6qoe4nojaYRvRn&open=AaHJ-t6qoe4nojaYRvRn&pullRequest=19224

Check warning on line 636 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/receiver/SubscriptionReceiverV1.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 153).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-vTroe4nojaYRvR3&open=AaHJ-vTroe4nojaYRvR3&pullRequest=19224

Check warning on line 86 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSessionWrapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wvqoe4nojaYRvSO&open=AaHJ-wvqoe4nojaYRvSO&pullRequest=19224

Check warning on line 107 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryAttemptRegistry.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 107).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-uRuoe4nojaYRvRr&open=AaHJ-uRuoe4nojaYRvRr&pullRequest=19224

Check warning on line 143 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.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=AaHJ-wHEoe4nojaYRvR6&open=AaHJ-wHEoe4nojaYRvR6&pullRequest=19224

Check warning on line 764 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.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 '728'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wKioe4nojaYRvR8&open=AaHJ-wKioe4nojaYRvR8&pullRequest=19224

Check warning on line 165 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.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 '131'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-wHEoe4nojaYRvR7&open=AaHJ-wHEoe4nojaYRvR7&pullRequest=19224

Check warning on line 65 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-sgxoe4nojaYRvRS&open=AaHJ-sgxoe4nojaYRvRS&pullRequest=19224

Check warning on line 103 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a thread-safe type; adding "volatile" is not enough to make this field thread-safe.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHJ-tNXoe4nojaYRvRc&open=AaHJ-tNXoe4nojaYRvRc&pullRequest=19224

Check warning on line 203 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.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=AaHJ-tS7oe4nojaYRvRi&open=AaHJ-tS7oe4nojaYRvRi&pullRequest=19224