Skip to content

Fix flaky CompactionWorkerTest by replacing fixed sleep with CountDownLatch - #18498

Merged
JackieTien97 merged 1 commit into
masterfrom
fix-ut-compaction-candidate-20260820
Aug 20, 2026
Merged

Fix flaky CompactionWorkerTest by replacing fixed sleep with CountDownLatch#18498
JackieTien97 merged 1 commit into
masterfrom
fix-ut-compaction-candidate-20260820

fix: make CompactionWorkerTest UT deterministic by using CountDownLat…

03920be
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Aug 20, 2026 in 7m 49s

Quality Gate failed

Failed conditions
B 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 830 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

'try' has incorrect indentation level 12, expected level should be 10.

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

Check warning on line 57 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/PipeTsFileConversionTaskManager.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=AaAdGB24B1rsUSwANkS7&open=AaAdGB24B1rsUSwANkS7&pullRequest=18498

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

'if' has incorrect indentation level 14, expected level should be 12.

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

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

Check failure on line 89 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTreeStatementDataTypeConvertExecutionVisitor.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=AaAdGB1pB1rsUSwANkS4&open=AaAdGB1pB1rsUSwANkS4&pullRequest=18498

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

'try rcurly' has incorrect indentation level 12, expected level should be 10.

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

Check warning on line 311 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTsFileSealWithModReq.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=AaAdGB-8B1rsUSwANkTH&open=AaAdGB-8B1rsUSwANkTH&pullRequest=18498

Check failure on line 112 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTsFileSealWithModReq.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AaAdGB-8B1rsUSwANkTI&open=AaAdGB-8B1rsUSwANkTI&pullRequest=18498

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

Check failure on line 67 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTableStatementDataTypeConvertExecutionVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

Check failure on line 214 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/util/LoadUtil.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=AaAdGB3-B1rsUSwANkS_&open=AaAdGB3-B1rsUSwANkS_&pullRequest=18498

Check warning on line 665 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.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 '515'.

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

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

Check warning on line 128 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 9 parameters, which is greater than 7 authorized.

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

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

'if rcurly' has incorrect indentation level 14, expected level should be 12.

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

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

'catch rcurly' has incorrect indentation level 12, expected level should be 10.

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

Check warning on line 473 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBDataRegionAirGapSink.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=AaAdGB-VB1rsUSwANkTG&open=AaAdGB-VB1rsUSwANkTG&pullRequest=18498

Check warning on line 866 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/IoTDBFileReceiver.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove these unused method parameters "req", "loadStatus".

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

Check warning on line 267 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/util/LoadUtil.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=AaAdGB3-B1rsUSwANkS-&open=AaAdGB3-B1rsUSwANkS-&pullRequest=18498

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

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

'catch' child has incorrect indentation level 14, expected level should be 12.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected @throws tag for 'Exception'.

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

Check warning on line 232 in iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.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=AaAdGCGSB1rsUSwANkTa&open=AaAdGCGSB1rsUSwANkTa&pullRequest=18498