MartijnVisser commented on code in PR #28645:
URL: https://github.com/apache/flink/pull/28645#discussion_r3542855634
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/timeline/RescaleTimelineITCase.java:
##########
@@ -567,7 +567,21 @@ void
testRecordNonTerminatedRescaleMergingWithNewRecoverableFailureTriggerCause(
miniCluster.terminateTaskManager(0);
- waitForVertexParallelismReachedAndJobRunning(jobGraph, JOB_VERTEX_ID,
PARALLELISM);
+ // A parallelism/running wait cannot synchronize with the failover
here: it is satisfied
+ // immediately by the stale pre-failover state, and the post-failover
job runs at a lower
+ // parallelism. Instead, wait until the failover has been merged into
the in-progress
+ // rescale before snapshotting. Guarded by if (not assumeThat) because
the disabled-history
+ // leg records nothing and must still assert an empty history below.
+ if (enabledRescaleHistory(configuration)) {
+ waitUntilConditionWithTimeout(
+ () -> {
+ List<Rescale> rescaleHistory =
getRescaleHistory(miniCluster, jobGraph);
+ return rescaleHistory.size() == 2
+ && rescaleHistory.get(0).getTriggerCause()
+ == TriggerCause.RECOVERABLE_FAILOVER;
Review Comment:
Good point, that's much cleaner, I've updated it, the net change against
master is now just PARALLELISM → NUMBER_SLOTS_PER_TASK_MANAGER on the existing
wait.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]