Jackeyzhe commented on code in PR #29161:
URL: https://github.com/apache/flink/pull/29161#discussion_r3996644760
##########
flink-tests/src/test/java/org/apache/flink/test/checkpointing/FileMergingChannelStateITCase.java:
##########
@@ -216,37 +228,135 @@ private StreamExecutionEnvironment createEnvironment(
return env;
}
+ /**
+ * Returns the path of a completed checkpoint that carries in-flight input
channel state for the
+ * slow mapper.
+ *
+ * <p>Whether a particular checkpoint contains in-flight data for a
particular subtask depends
+ * on where the barriers happen to be when the checkpoint is triggered, so
waiting for a fixed
+ * number of checkpoints - or for the latest checkpoint that persisted
<em>any</em> in-flight
+ * data anywhere in the job - also accepts checkpoints that do not
exercise channel state
+ * recovery for the mapper at all. Inspect the metadata of every completed
checkpoint instead
+ * and return the first one that really contains the state this test is
about.
+ */
+ private static String waitForCheckpointWithSlowMapperChannelState(
+ JobID jobID, MiniCluster miniCluster) throws Exception {
+ final Set<Long> inspectedCheckpoints = new HashSet<>();
+ final AtomicReference<String> restorePath = new AtomicReference<>();
+ CommonTestUtils.waitUntilCondition(
Review Comment:
Could we give this lookup an explicit deadline and include
`inspectedCheckpoints` in the timeout failure? The one-argument
`waitUntilCondition` loops without a timeout, while
`failIfJobStoppedCheckpointing` only fires after the job becomes terminal. If
the job remains running and completed checkpoints never contain the slow
mapper's channel state, this test can hang until the outer build timeout, which
keeps the original diagnosability problem.
--
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]