Skip to content

Improve error messages for unsupported __audit database operations#18309

Merged
CRZbulabula merged 2 commits into
masterfrom
yongzao/improve-audit-database-error-message
Jul 25, 2026
Merged

Improve error messages for unsupported __audit database operations#18309
CRZbulabula merged 2 commits into
masterfrom
yongzao/improve-audit-database-error-message

Fix internal audit user check

93d3d65
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jul 25, 2026 in 9m 59s

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 52 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/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-Zf0Iq4hBPh09VBBzA&open=AZ-Zf0Iq4hBPh09VBBzA&pullRequest=18309

Check failure on line 62 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RequestSizeLimitFilter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 95 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/filter/RequestSizeLimitFilter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 167).

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

Check warning on line 263 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

Move this method into "Reservation".

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

Check warning on line 256 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaServerBuilder.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 223).

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

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-Zfzwl4hBPh09VBByq&open=AZ-Zfzwl4hBPh09VBByq&pullRequest=18309

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-Zfzs94hBPh09VBBym&open=AZ-Zfzs94hBPh09VBBym&pullRequest=18309

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-Zfzwl4hBPh09VBByp&open=AZ-Zfzwl4hBPh09VBByp&pullRequest=18309

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

Cast one of the operands of this addition operation to a "long".

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

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-Zfz0z4hBPh09VBByu&open=AZ-Zfz0z4hBPh09VBByu&pullRequest=18309

Check warning on line 726 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 localdate'

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

Check warning on line 52 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/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-Zf0GT4hBPh09VBBy-&open=AZ-Zf0GT4hBPh09VBBy-&pullRequest=18309

Check warning on line 121 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

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

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

Check warning on line 115 in external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.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-Zf0JU4hBPh09VBBzB&open=AZ-Zf0JU4hBPh09VBBzB&pullRequest=18309

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

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

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

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

"notify" may not wake up the appropriate thread.

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

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

Replace generic exceptions with specific library exceptions or a custom exception.

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

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-Zfz604hBPh09VBByz&open=AZ-Zfz604hBPh09VBByz&pullRequest=18309

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

Line is longer than 100 characters (found 146).

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

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-Zf0BW4hBPh09VBBy1&open=AZ-Zf0BW4hBPh09VBBy1&pullRequest=18309

Check warning on line 283 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.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 '162'.

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

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-Zf0EQ4hBPh09VBBy4&open=AZ-Zf0EQ4hBPh09VBBy4&pullRequest=18309

Check warning on line 127 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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