zhijiangW commented on a change in pull request #9483: [FLINK-13767][task] Migrate isFinished method from AvailabilityListener to AsyncDataInput URL: https://github.com/apache/flink/pull/9483#discussion_r322302273
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputProcessor.java ########## @@ -158,43 +173,34 @@ public boolean isFinished() { } @Override - public boolean processInput() throws Exception { - if (!isPrepared) { - // the preparations here are not placed in the constructor because all work in it - // must be executed after all operators are opened. - prepareForProcessing(); - } + public InputStatus processInput() throws Exception { + // the preparations here are not placed in the constructor because all work in it + // must be executed after all operators are opened. + prepareForProcessing(); int readingInputIndex = selectNextReadingInputIndex(); if (readingInputIndex == -1) { - return false; + return InputStatus.NOTHING_AVAILABLE; Review comment: Actually it would not happen that case. If both inputs were ended before, then the `StreamTask` would call `context.allActionsCompleted()` in last calling `processInput`, so this calling `processInput` would never happen. In other words, if the `processInput` is called, that means at-least one of the inputs is not finished yet. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services