[FLINK-40067][tests] Fix race in RescaleTimelineITCase.testRescaleTerminatedByJobFinished#28633
Open
MartijnVisser wants to merge 1 commit into
Open
Conversation
…minatedByJobFinished On a loaded machine the cooldown-driven Idling transition terminates the in-progress rescale with NO_RESOURCES_OR_PARALLELISMS_CHANGE before the job finishes, so goToFinished's later JOB_FINISHED stamp is dropped and the wait can never succeed. Widen the fixture cooldown to keep the rescale in-progress until the job finishes, mirroring FLINK-39903/FLINK-40010. Generated-by: Claude Opus 4.8 (1M context)
Collaborator
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.
What is the purpose of the change
Fixes a test-side timing race that makes
RescaleTimelineITCase.testRescaleTerminatedByJobFinishedflaky on loaded CI machines (Azure build 76571, legtest_cron_hadoop313_core). With the short 100ms cooldown shared by the parameterized fixture, the cooldown-drivenIdlingtransition ofDefaultStateTransitionManagerterminates the in-progress rescale withNO_RESOURCES_OR_PARALLELISMS_CHANGEbefore the job finishes;goToFinished's laterJOB_FINISHEDstamp is then dropped (DefaultRescaleTimeline#updateRescaleis a no-op once the rescale is terminated), so the awaited condition can never be met. The timeout only became observable after FLINK-40009 made the wait helper's budget real. Both terminal reasons are legitimate product behaviour; this is not a product bug.Brief change log
rebuildClusterWithExecutingTimeoutshelper, keeping the in-progress rescale alive past the unblock-to-finish window (mirrors the sibling fixes FLINK-39903/FLINK-40010).Verifying this change
This change is already covered by existing tests. Ran
testRescaleTerminatedByJobFinished4x and the fullRescaleTimelineITCase(30 run, 0 failures, 8 skipped); the method now completes in under 2 seconds, confirmingJOB_FINISHEDis stamped while the rescale is still in progress rather than waiting out any timer. The original failure needs a starved JobManager thread on a loaded CI machine and is not reproducible locally; the fix removes the dependency on that timer ordering entirely.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.8 (1M context)