perf(test): cut high-cost CI test latency while preserving coverage - #20127
perf(test): cut high-cost CI test latency while preserving coverage#20127FrankChen021 wants to merge 12 commits into
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 2 |
| P3 | 0 |
| Total | 2 |
The review found two P2 test and integration risks affecting fault-tolerance timing and Kinesis request batching.
Reviewed 9 of 9 changed files.
This is an automated review by Codex GPT-5.6-Luna(max)
| .addProperty("druid.unsafe.cluster.testing", "true") | ||
| .addProperty("druid.unsafe.cluster.testing.overlordClient.taskStatusDelay", "PT1H") | ||
| // Keep the injected delay short so the retry path is exercised without a one-hour wait. | ||
| .addProperty("druid.unsafe.cluster.testing.overlordClient.taskStatusDelay", "PT1S") |
There was a problem hiding this comment.
[P2] One-second delay no longer reliably blocks the faulty worker
The faulty worker can resume after this delay while the functional indexer is starting, allowing it to finish before cancellation. The FAILED assertion then becomes timing-dependent. Keep the delay longer than setup or synchronize on a state proving the worker remains blocked.
| Function<byte[], String> partitionKeyFunction | ||
| ) | ||
| { | ||
| for (int start = 0; start < records.size(); start += PUT_RECORDS_BATCH_SIZE) { |
There was a problem hiding this comment.
[P2] Batching ignores Kinesis aggregate request-size limit
PutRecords is limited to both 500 records and a 5 MiB aggregate payload. A 500-record batch can exceed 5 MiB and be rejected, whereas the previous per-record loop accepted individually valid records. Bound batches by total size as well as count.
Summary
Reduce avoidable latency in high-cost test fixtures and setup paths while preserving test payloads, ordering, partitioning, transaction boundaries, retry/failure injection, and assertions.
The optimized values are averages of passing local Surefire runs. Interrupted or resource-limited runs are excluded.
Surefire duration comparison
AutoCompactionTestfiltered supervisor testsMSQWorkerFaultToleranceTest#test_cancelledWorker_isRetried_ifFaultToleranceIsEnabledCostBasedAutoScalerIntegrationTest#test_autoScaler_scalesUpAndDown_withSlowPublishFrameWriterTest#test_insufficientWriteCapacity(3 applicable parameter sets)RangePartitionMultiPhaseParallelIndexingTest[4]#createsCorrectRangePartitionsKafkaRecordSupplierTest#testSeekUnassignedKinesisFaultToleranceTest#test_supervisorRecovers_afterCoordinatorRestartKinesisFaultToleranceTest#test_supervisorRecovers_afterHistoricalRestartKinesisFaultToleranceTest#test_supervisorRecovers_afterOverlordRestartKinesisFaultToleranceTest#test_supervisorRecovers_afterSuspendResumeMergingRowIteratorTest#testAllPossible5ElementSequencesValidation
apache/druid/master.mvn -ntp test-compile -pl embedded-tests,processing,indexing-service -am -Pskip-static-checks -Dweb.console.skip=true -T1C— passed.git diff --checkpassed before publication.