fix(processing): finalize SuperSorter progress before completion - #20054
Open
FrankChen021 wants to merge 1 commit into
Open
fix(processing): finalize SuperSorter progress before completion#20054FrankChen021 wants to merge 1 commit into
FrankChen021 wants to merge 1 commit into
Conversation
FrankChen021
commented
Aug 18, 2026
FrankChen021
left a comment
Member
Author
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)
Member
Author
|
@gianm please take a look at this change. Currently many PRs are experencing the same |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.