Skip to content

Fix race condition in ExternalTsFileQueryResource reference counting - #18371

Merged
shuwenwei merged 1 commit into
masterfrom
fix-external-tsfile-resource-race
Jul 31, 2026
Merged

Fix race condition in ExternalTsFileQueryResource reference counting#18371
shuwenwei merged 1 commit into
masterfrom
fix-external-tsfile-resource-race

Fix race condition in ExternalTsFileQueryResource reference counting

dcb71a2
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 31, 2026 in 3m 14s

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 205 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/plugin/TwoStageCountProcessor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 112).

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

Check warning on line 558 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'case' child has incorrect indentation level 10, expected level should be 6.

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

Check warning on line 1012 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 125).

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

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

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

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

Check warning on line 115 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.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=AZ-3IdI6rPk5Bsk30sqc&open=AZ-3IdI6rPk5Bsk30sqc&pullRequest=18371

Check warning on line 30 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/LockQueue.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=AZ-3IdKfrPk5Bsk30sqx&open=AZ-3IdKfrPk5Bsk30sqx&pullRequest=18371

Check warning on line 236 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/HybridProgressIndex.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename "type2Index" which hides the field declared at line 54.

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

Check warning on line 120 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/PasswordChangeAuditContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof AuthorStatement authorstatement'

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

Check warning on line 471 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 126).

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

Check failure on line 171 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeTaskAgent.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 1376 in iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.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=AZ-3IdUFrPk5Bsk30sq9&open=AZ-3IdUFrPk5Bsk30sq9&pullRequest=18371

Check warning on line 554 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'case' child has incorrect indentation level 10, expected level should be 6.

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

Check warning on line 116 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

WhitespaceAround: '{' is not followed by whitespace. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3)

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

Check warning on line 1376 in iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.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 106 to 64, Complexity from 16 to 14, Nesting Level from 4 to 2, Number of Variables from 13 to 6.

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

Check warning on line 128 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/PasswordChangeAuditContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof RelationalAuthorStatement relationalauthorstatement'

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

Check warning on line 70 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 525 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 132).

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

Check warning on line 464 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 101).

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

Check failure on line 267 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/pipe/AbstractOperatePipeProcedureV2.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-3IdI6rPk5Bsk30sqe&open=AZ-3IdI6rPk5Bsk30sqe&pullRequest=18371

Check warning on line 1469 in iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 105).

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

Check failure on line 698 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Fix this access that may throw a NullPointerException when executed.

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

Check warning on line 3799 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.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=AZ-3Ic8FrPk5Bsk30sqD&open=AZ-3Ic8FrPk5Bsk30sqD&pullRequest=18371

Check warning on line 72 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/audit/PasswordChangeAuditTask.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Catch Exception instead of Error.

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

Check warning on line 551 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ProcedureFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof AlterTopicProcedure altertopicprocedure'

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

Check warning on line 73 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.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=AZ-3IdNdrPk5Bsk30sq2&open=AZ-3IdNdrPk5Bsk30sq2&pullRequest=18371