[
https://issues.apache.org/jira/browse/FLINK-40789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152934#comment-18152934
]
Martijn Visser commented on FLINK-40789:
----------------------------------------
I went through every failure of the two classes since FLINK-40150 was merged
(FLINK-40067 on release-2.3): 28 of 1787 Azure core legs and 2 of 941 GHA core
jobs. Apart from 4 on release-2.3 without a JVM log, they have one of two
causes, both in the tests.
The first is the job starting at parallelism 2 (4 failures, plus 3 in
{{testRecordRescaleForRecoverableFailover}}). The second TaskManager offers its
slots 57 to 103 ms after the first, after the 50 ms submission resource
stabilization timeout. {{waitForVertexParallelismReachedAndJobRunning}} misses
this: before the first scheduling, the scheduler reports the JobGraph
parallelism, so the parallelism check passes too early and the RUNNING check
then passes at 2.
The second is the requirement update racing the 100 ms cooldown (20 failures).
{{waitUntilCondition}} polls every 100 ms. When the first poll misses RUNNING,
the update arrives late in the cooldown, and the transition from Cooldown to
Idling can end it with NO_RESOURCES_OR_PARALLELISMS_CHANGE before the test
cancels, fails or inspects the job.
Locally I delayed the second TaskManager's registration or the requirement
update, which reproduces the CI failures at the same lines.
https://github.com/apache/flink/pull/30096 raises both timeouts, which only
moves the threshold, see my review there. Slow machines make both races more
likely, which matches Naveen's container runs, but the timing windows are in
the tests.
> RescaleTimelineITCase.testRecordRescaleForNewAvailableResource records three
> rescales instead of two
> ----------------------------------------------------------------------------------------------------
>
> Key: FLINK-40789
> URL: https://issues.apache.org/jira/browse/FLINK-40789
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Coordination
> Affects Versions: 2.3.1, 2.4.0, 2.5.0
> Reporter: Martijn Visser
> Assignee: Naveen Joseph
> Priority: Critical
> Labels: pull-request-available, test-stability
> Attachments: image-2026-11-10-15-51-43-575.png
>
>
> https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=79368&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1
> (master push 2026-09-23, test_ci core, JDK 17)
> {code}
> [ERROR]
> org.apache.flink.runtime.scheduler.adaptive.timeline.RescaleTimelineITCase.testRecordRescaleForNewAvailableResource
> -- Time elapsed: 0.722 s <<< FAILURE!
> java.lang.AssertionError:
> Expected size: 2 but was: 3 in:
> [Rescale{... rescaleAttemptId=3, ... preRescaleParallelism=4,
> postRescaleParallelism=6 ... triggerCause=NEW_RESOURCE_AVAILABLE,
> terminalState=COMPLETED ...},
> Rescale{... rescaleAttemptId=2, ... preRescaleParallelism=2,
> postRescaleParallelism=4 ... triggerCause=NEW_RESOURCE_AVAILABLE,
> terminalState=COMPLETED ...},
> Rescale{... rescaleAttemptId=1, ... preRescaleParallelism=null,
> postRescaleParallelism=2 ... triggerCause=INITIAL_SCHEDULE,
> terminalState=COMPLETED ...}]
> at
> org.apache.flink.runtime.scheduler.adaptive.timeline.RescaleTimelineITCase.lambda$testRecordRescaleForNewAvailableResource$2(RescaleTimelineITCase.java:170)
> at
> org.apache.flink.runtime.scheduler.adaptive.timeline.RescaleTimelineITCase.runAdaptedParameterizedAssertion(RescaleTimelineITCase.java:397)
> at
> org.apache.flink.runtime.scheduler.adaptive.timeline.RescaleTimelineITCase.testRecordRescaleForNewAvailableResource(RescaleTimelineITCase.java:164)
> {code}
>
>
> The test expects the initial schedule at parallelism 4 and
> one upscale to 6 after the third TaskManager starts. Here the job was first
> scheduled at 2 and went 2 -> 4 -> 6. The other RescaleTimelineITCase methods
> had similar races fixed in FLINK-40010, FLINK-40067 and FLINK-40076; this
> method has no ticket.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)