AHeise commented on a change in pull request #14797:
URL: https://github.com/apache/flink/pull/14797#discussion_r567060705



##########
File path: 
flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java
##########
@@ -282,20 +281,39 @@ public void addSplits(List<LongSplit> splits) {
                             "Tried to add " + splits + " but already got " + 
split);
                 }
                 split = Iterables.getOnlyElement(splits);
+                checkShouldFinish();
                 LOG.info(
-                        "Added split {} @ {} subtask ({} attempt)",
+                        "Added split {}, shouldFinish={} @ {} subtask ({} 
attempt)",
                         split,
+                        shouldFinish,
                         split.nextNumber % split.increment,
                         numRestarts);
             }
 
+            /** Should only be called if the split has been successfully 
checkpointed. */
+            private void checkShouldFinish() {
+                shouldFinish =
+                        split != null
+                                && split.numCompletedCheckpoints >= 
minCheckpoints
+                                && numRestarts >= expectedRestarts;
+            }
+
             @Override
-            public void notifyNoMoreSplits() {}
+            public void notifyNoMoreSplits() {
+                LOG.info("notifyNoMoreSplits ({} attempt)", numRestarts);
+                shouldFinish = true;
+            }

Review comment:
       No, removing.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to