pnowojski commented on a change in pull request #8826: [FLINK-12479][operators]
Integrate StreamInputProcessor(s) with mailbox
URL: https://github.com/apache/flink/pull/8826#discussion_r297665285
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputSelectableProcessor.java
##########
@@ -195,14 +216,11 @@ public void cleanup() throws Exception {
}
}
- private int selectNextReadingInputIndex()
- throws InterruptedException, ExecutionException, IOException {
-
+ private int selectNextReadingInputIndex() {
+ updateAvailability();
int readingInputIndex;
- while ((readingInputIndex =
inputSelection.fairSelectNextIndexOutOf2(availableInputsMask,
lastReadInputIndex)) == -1) {
- if (!waitForAvailableInput(inputSelection)) {
- return -1;
- }
+ if ((readingInputIndex =
inputSelection.fairSelectNextIndexOutOf2(availableInputsMask,
lastReadInputIndex)) == -1) {
Review comment:
Yes, you are right, I've changed it as you suggested.
I didn't merge those two conditions, as otherwise it would be less clear to
what the `// to avoid starvation (...)` comment applies.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services