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_r232637615
########## 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: Shouldn't then the `checkFail` call alone be enough? The `isRestored` flag is already checked there. ---------------------------------------------------------------- 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