rkhachatryan commented on a change in pull request #16102:
URL: https://github.com/apache/flink/pull/16102#discussion_r648587456



##########
File path: 
flink-tests/src/test/java/org/apache/flink/test/checkpointing/IgnoreInFlightDataITCase.java
##########
@@ -179,11 +205,30 @@ public void initializeState(FunctionInitializationContext 
context) throws Except
 
     private static class SlowMap extends RichMapFunction<Integer, Integer> {
 
+        private static OneShotLatch checkpointReachSinkLatch;
+        private static AtomicInteger idGenerator;
+        public int subtaskMapId;
+
+        public SlowMap() {
+            checkpointReachSinkLatch = new OneShotLatch();
+            idGenerator = new AtomicInteger();

Review comment:
       I took a deeper look and realized that we only need subtaskIndex:
   ```
           @Override
           public Integer map(Integer value) throws Exception {
               // Allow working only one last subtask until the checkpoint 
barrier reaches the sink.
               if (getRuntimeContext().getIndexOfThisSubtask() > 0) {
   ```
   and don't need neither `idGenerator` nor `subtaskMapId`.




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


Reply via email to