tzulitai commented on a change in pull request #7048: [FLINK-10809][state] 
Include keyed state that is not from head operat…
URL: https://github.com/apache/flink/pull/7048#discussion_r232558772
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/datastream/ReinterpretDataStreamAsKeyedStreamITCase.java
 ##########
 @@ -187,26 +208,71 @@ public void run(SourceContext<Tuple2<Integer, Integer>> 
out) throws Exception {
                        this.running = true;
                        try {
                                while (running) {
-                                       Integer key = din.readInt();
-                                       Integer val = din.readInt();
-                                       out.collect(new Tuple2<>(key, val));
+
+                                       checkFail();
+
+                                       synchronized (out.getCheckpointLock()) {
+                                               Integer key = din.readInt();
+                                               Integer val = din.readInt();
+                                               out.collect(new Tuple2<>(key, 
val));
+
+                                               position += 2 * Integer.BYTES;
+                                       }
                                }
                        } catch (EOFException ignore) {
+                               while (!isRestored) {
 
 Review comment:
   This while loop is a bit confusing for me.
   Isn't `isRestored` set only once in `initializeState`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to