StefanRRichter 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_r232744683
##########
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:
Yeah, I guess we can just check it once in the beginning as an `if`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services