Skip to content

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

Merged
JackieTien97 merged 5 commits into
masterfrom
ty/query-attempt-cleanup
Nov 13, 2026
Merged

JackieTien97 merged 5 commits into
masterfrom
ty/query-attempt-cleanup

[Query] Reuse fragment management executor for attempt expiry

2608feb
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Nov 13, 2026 in 5m 57s

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 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 138 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/consumer/AlterConsumerGroupProcedure.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 '127'.

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

Check warning on line 584 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 38 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/internal/session/InternalTableSessionPoolBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 72 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 97 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected @throws tag for 'IllegalStateException'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHN9yb_6HOFKMBnMshK&open=AaHN9yb_6HOFKMBnMshK&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 199 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaHN9yb_6HOFKMBnMshO&open=AaHN9yb_6HOFKMBnMshO&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 81 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Convert this Map to an EnumMap.

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

Check warning on line 560 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=AaHJ-uz6oe4nojaYRvRz&open=AaHJ-uz6oe4nojaYRvRz&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 120 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/SimpleQueryTerminator.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=AaHJ-tJ-oe4nojaYRvRa&open=AaHJ-tJ-oe4nojaYRvRa&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 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 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 warning on line 1512 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 147 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFTable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 66 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionTableSessionBuilder.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-wqaoe4nojaYRvSK&open=AaHJ-wqaoe4nojaYRvSK&pullRequest=19224

Check warning on line 95 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/InsertValues.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This copy constructor leaves eligible fields uninitialized; initialize them explicitly to distinguish omissions from intentional resets.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof Number number'

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

Check warning on line 321 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToTimeFilterVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof GenericLiteral genericliteral'

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

Check warning on line 1981 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 115).

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

Check warning on line 91 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/InsertValues.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=AaHN92fZ6HOFKMBnMshm&open=AaHN92fZ6HOFKMBnMshm&pullRequest=19224

Check warning on line 85 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/InsertValues.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=AaHN92fZ6HOFKMBnMshl&open=AaHN92fZ6HOFKMBnMshl&pullRequest=19224