Skip to content

Fix consensus subscription WAL retention and replay cursor - #19042

Open
Caideyipi wants to merge 2 commits into
masterfrom
fix/subscription-wal-roll-retention-20261028
Open

Caideyipi wants to merge 2 commits into
masterfrom
fix/subscription-wal-roll-retention-20261028

Address WAL retention and replay review feedback

135535a
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Oct 30, 2026 in 4m 12s

Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)
C Security 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 47 in iotdb-core/datanode/src/main/java/org/apache/tsfile/write/BufferedFileChannelOutput.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=AaGCNueXPWSXd-YsPvkh&open=AaGCNueXPWSXd-YsPvkh&pullRequest=19042

Check warning on line 91 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadPointCompactionPerformer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this private field "final", it is never reassigned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNqbiPWSXd-YsPvh0&open=AaGCNqbiPWSXd-YsPvh0&pullRequest=19042

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

Make this private field "final", it is never reassigned.

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

Check warning on line 34 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/InternalDatabaseUtils.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=AaGCNqMOPWSXd-YsPvhw&open=AaGCNqMOPWSXd-YsPvhw&pullRequest=19042

Check warning on line 82 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this private field "final", it is never reassigned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNqenPWSXd-YsPvh6&open=AaGCNqenPWSXd-YsPvh6&pullRequest=19042

Check warning on line 86 in iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBJDBCResultSet.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this private field "final", it is never reassigned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNwPuPWSXd-YsPvls&open=AaGCNwPuPWSXd-YsPvls&pullRequest=19042

Check warning on line 292 in iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.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=AaGCNv9sPWSXd-YsPvlO&open=AaGCNv9sPWSXd-YsPvlO&pullRequest=19042

Check failure on line 466 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/AlignedChunkData.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNrswPWSXd-YsPvi7&open=AaGCNrswPWSXd-YsPvi7&pullRequest=19042

Check warning on line 63 in iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/topic/DropTopicProcedure.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This class has 6 parents which is greater than 5 authorized.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Merge this if statement with the enclosing one.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNvGXPWSXd-YsPvky&open=AaGCNvGXPWSXd-YsPvky&pullRequest=19042

Check warning on line 55 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncryptDBUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this method into "ProviderHolder".

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNti6PWSXd-YsPvj3&open=AaGCNti6PWSXd-YsPvj3&pullRequest=19042

Check failure on line 95 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncryptDBUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this "try" to a try-with-resources.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNti6PWSXd-YsPvj1&open=AaGCNti6PWSXd-YsPvj1&pullRequest=19042

Check warning on line 19 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/SharedExchangeBudgetEligibility.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=AaGCNsU2PWSXd-YsPvjO&open=AaGCNsU2PWSXd-YsPvjO&pullRequest=19042

Check warning on line 442 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.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=AaGCNs4LPWSXd-YsPvjc&open=AaGCNs4LPWSXd-YsPvjc&pullRequest=19042

Check warning on line 172 in iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AnyChildBlocked.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof Error error'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNulXPWSXd-YsPvkn&open=AaGCNulXPWSXd-YsPvkn&pullRequest=19042

Check warning on line 560 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.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=AaGCNsy9PWSXd-YsPvja&open=AaGCNsy9PWSXd-YsPvja&pullRequest=19042

Check warning on line 123 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested try block into a separate method.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNqn1PWSXd-YsPvh_&open=AaGCNqn1PWSXd-YsPvh_&pullRequest=19042

Check failure on line 761 in iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBTablePreparedStatement.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=AaGCNwARPWSXd-YsPvlV&open=AaGCNwARPWSXd-YsPvlV&pullRequest=19042

Check failure on line 210 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionSetupHandler.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=AaGCNt3qPWSXd-YsPvkQ&open=AaGCNt3qPWSXd-YsPvkQ&pullRequest=19042

Check warning on line 596 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.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=AaGKzIbyKxFu2gu0WLhz&open=AaGKzIbyKxFu2gu0WLhz&pullRequest=19042

Check failure on line 2469 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNtwYPWSXd-YsPvkJ&open=AaGCNtwYPWSXd-YsPvkJ&pullRequest=19042

Check warning on line 35 in iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this private field "final", it is never reassigned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNv9sPWSXd-YsPvlS&open=AaGCNv9sPWSXd-YsPvlS&pullRequest=19042

Check warning on line 701 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make this private field "final", it is never reassigned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaGCNuM7PWSXd-YsPvkX&open=AaGCNuM7PWSXd-YsPvkX&pullRequest=19042

Check warning on line 507 in iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBAbstractDatabaseMetadata.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=AaGCNwIEPWSXd-YsPvld&open=AaGCNwIEPWSXd-YsPvld&pullRequest=19042

Check failure on line 2950 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.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=AaGCNtGHPWSXd-YsPvjo&open=AaGCNtGHPWSXd-YsPvjo&pullRequest=19042