fix(processing): finalize SuperSorter progress before completion - #20054
fix(processing): finalize SuperSorter progress before completion#20054FrankChen021 wants to merge 1 commit into
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 2 of 2 changed files.
Validation: git diff --check cb26014728ab3239bc8d7391f9cf6466e63905b0..HEAD passed. Builds and tests were not run.
This is an automated review by Codex GPT-5.6-Luna(max)
|
@gianm please take a look at this change. Currently many PRs are experencing the same |
1d3f168 to
5e06e87
Compare
5e06e87 to
c20877f
Compare
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 2 of 2 changed files.
Validation: git diff HEAD^ HEAD --check passed. Builds and tests were not run.
This is an automated review by Codex GPT-5.6-Luna(max)
Description
SuperSortercould complete itsallDonefuture before the asynchronous output-partitions listener initialized the progress tracker's ultimate merger count. A caller returning fromrun().get()could therefore briefly observe a progress digest of0.0instead of1.0. This surfaced as repeatedSuperSorterTestflakes in the JDK 25S*CI shard.This change routes every successful sorter completion through a helper that initializes the ultimate merger count before publishing
allDone. Initialization is idempotent under the existingrunWorkersLock, so the output-partitions listener can run either before or after worker completion without double-setting the tracker.The regression test delays the output-partitions listener, waits for sorting to complete, and verifies that final progress was already initialized before releasing the listener.
CI evidence
The same
SuperSorterTestprogress assertion (expected: <1.0> but was: <0.0>) appeared independently in these JDK 25S*jobs:S*jobS*jobThe unchanged #20045 head then passed on an exact job rerun, confirming that the failure is timing-sensitive.
The same SuperSorterTest failure also reproduced on PR #20078's initial JDK 25 S* job (https://github.com/apache/druid/actions/runs/32325623822/job/96296160599); its single permitted rerun (https://github.com/apache/druid/actions/runs/32325623822/job/96324754231) reproduced the flake, further confirming the timing-sensitive failure.
The same
expected: <1.0> but was: <0.0>assertion also reproduced on PR #20085's failing JDK 25S*job, specifically inSuperSorterTest$ParameterizedCasesTest.test_clusterByPlacementishDescRowNumberAsc_fourPartitions; the shard later timed out after 60 minutes.Release note
None. This fixes internal progress-reporting ordering and test flakiness without changing configuration, APIs, persisted data, or query results.
Key changed/added classes in this PR
SuperSorterSuperSorterTestThis PR has:
Validation:
Result: 10,905 tests run, 0 failures, 0 errors, 0 skipped.