akalash commented on a change in pull request #15728:
URL: https://github.com/apache/flink/pull/15728#discussion_r620235679
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/DefaultCheckpointPlanCalculatorTest.java
##########
@@ -149,23 +151,114 @@ public void testComputeWithMultipleLevels() throws
Exception {
}
@Test
- public void testWithTriggeredTasksNotRunning() throws Exception {
+ public void testNotRunningOneOfSourcesTriggeredTasksNotRunning() throws
Exception {
+ // given: Execution graph builder with one RUNNING source and NOT
RUNNING source.
+ FunctionWithException<JobVertexID, ExecutionGraph, Exception>
twoSourcesBuilder =
+ (id) ->
+ new
CheckpointCoordinatorTestingUtils.CheckpointExecutionGraphBuilder()
+ .addJobVertex(id)
+ .addJobVertex(new JobVertexID())
+ .setTransitToRunning(vertex ->
!vertex.getJobvertexId().equals(id))
+ .build();
+
+ // when: Creating the checkpoint plan for aligned and unaligned
checkpoints.
+ runWithNotRunTask(twoSourcesBuilder, true);
+ runWithNotRunTask(twoSourcesBuilder, false);
Review comment:
I don't sure that to test both scenarios(aligned and unaligned) in one
test is good idea but I didn't find good example to implement that.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointPlanCalculator.java
##########
@@ -30,6 +30,8 @@
* Calculates the plan of the next checkpoint.
*
* @return The result plan.
+ * @param isUnalignedCheckpoint {@code true} if plan should be calculated
for unaligned
+ * checkpoint.
*/
- CompletableFuture<CheckpointPlan> calculateCheckpointPlan();
+ CompletableFuture<CheckpointPlan> calculateCheckpointPlan(boolean
isUnalignedCheckpoint);
Review comment:
Perhaps, it makes sense to make this flag as the field of
DefaultCheckpointPlanCalculator because as I understand, it is impossible to
change the checkpoint configuration on runtime.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]