spuru9 commented on code in PR #27954:
URL: https://github.com/apache/flink/pull/27954#discussion_r3100300311


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/utils/FailingCollectionSource.java:
##########
@@ -166,9 +166,13 @@ public void run(SourceContext<T> ctx) throws Exception {
             if (!failedBefore) {
                 // delay a bit, if we have not failed before
                 Thread.sleep(1);
-                if (numSuccessfulCheckpoints >= 1 && 
lastCheckpointedEmittedNum >= 1) {
-                    // cause a failure if we have not failed before and have a 
completed checkpoint
-                    // and have processed at least one element
+                if (numSuccessfulCheckpoints >= 1

Review Comment:
   numSuccessfulCheckpoints >= 1 is now redundant — lastCheckpointedEmittedNum 
is only set in notifyCheckpointComplete (which increments the counter first), 
and failureAfterNumElements > 0 is enforced in the constructor.
   I believe we can drop numSuccessfulCheckpoints >= 1. WDYT? 



-- 
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]

Reply via email to