zentol commented on a change in pull request #7753: [FLINK-11041][tests] Fix
ReinterpretDataStreamAsKeyedStreamITCase
URL: https://github.com/apache/flink/pull/7753#discussion_r258854770
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/datastream/ReinterpretDataStreamAsKeyedStreamITCase.java
##########
@@ -207,33 +213,34 @@ public void close() throws Exception {
@Override
public void run(SourceContext<Tuple2<Integer, Integer>> out)
throws Exception {
- this.running = true;
- try {
- while (running) {
- checkFail();
+ running = true;
- synchronized (out.getCheckpointLock()) {
- Integer key = din.readInt();
- Integer val = din.readInt();
- out.collect(new Tuple2<>(key,
val));
+ while (running && hasMoreDataToRead()) {
- position += 2 * Integer.BYTES;
- }
+ synchronized (out.getCheckpointLock()) {
+ position += 2 * Integer.BYTES;
Review comment:
In that case let's revert the change to `position`, keep the remaining
changes and merge it. I particular like that we now have a well-defined failure
point, this may have done the trick. (Although it would be good to know which
edge-case we actually ran into :/)
@flinkbot approve all
----------------------------------------------------------------
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