Skip to content

Fix SHOW QUERIES and KILL QUERY privilege filtering - #18359

Open
shuwenwei wants to merge 4 commits into
masterfrom
fix-show-queries-system-privilege
Open

Fix SHOW QUERIES and KILL QUERY privilege filtering#18359
shuwenwei wants to merge 4 commits into
masterfrom
fix-show-queries-system-privilege

Merge query management integration tests

b1ce540
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 30, 2026 in 3m 43s

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 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-xHFCM4CZyFP_G3Yl3&open=AZ-xHFCM4CZyFP_G3Yl3&pullRequest=18359

Check warning on line 478 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 130).

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

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-xHFCM4CZyFP_G3Yl5&open=AZ-xHFCM4CZyFP_G3Yl5&pullRequest=18359

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Simplify this regular expression to reduce its complexity from 25 to the 20 allowed.

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

Check warning on line 505 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 117).

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Merge the previous cases into this one using comma-separated label.

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

Check warning on line 187 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-xHFBr4CZyFP_G3Ylv&open=AZ-xHFBr4CZyFP_G3Ylv&pullRequest=18359

Check warning on line 481 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 125).

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

Check warning on line 937 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 90 to 64, Complexity from 23 to 14, Nesting Level from 4 to 2, Number of Variables from 27 to 6.

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

Check warning on line 1128 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-xHFBr4CZyFP_G3Yly&open=AZ-xHFBr4CZyFP_G3Yly&pullRequest=18359

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

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 '1,253'.

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

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-xHFCM4CZyFP_G3Yl6&open=AZ-xHFCM4CZyFP_G3Yl6&pullRequest=18359

Check warning on line 1029 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 108).

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

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-xHE8g4CZyFP_G3Ylk&open=AZ-xHE8g4CZyFP_G3Ylk&pullRequest=18359

Check warning on line 272 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/AccessControlImpl.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 250 to 64, Complexity from 61 to 14, Nesting Level from 3 to 2, Number of Variables from 10 to 6.

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

Check warning on line 438 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-xHFBr4CZyFP_G3Ylw&open=AZ-xHFBr4CZyFP_G3Ylw&pullRequest=18359

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

Line is longer than 100 characters (found 120).

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

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-xHFDz4CZyFP_G3YmJ&open=AZ-xHFDz4CZyFP_G3YmJ&pullRequest=18359

Check warning on line 480 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/scan/TsFileInsertionEventScanParser.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 134 to 64, Complexity from 34 to 14, Nesting Level from 4 to 2, Number of Variables from 8 to 6.

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

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-xHFHd4CZyFP_G3Ymk&open=AZ-xHFHd4CZyFP_G3Ymk&pullRequest=18359

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Distance between variable 'operation' declaration and its first usage is 6, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

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

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-xHFDz4CZyFP_G3YmS&open=AZ-xHFDz4CZyFP_G3YmS&pullRequest=18359

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Distance between variable 'address' declaration and its first usage is 6, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

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

Check warning on line 1046 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 153).

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

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

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-xHFGb4CZyFP_G3Ymf&open=AZ-xHFGb4CZyFP_G3Ymf&pullRequest=18359