pnowojski commented on a change in pull request #11529:
[FLINK-16806][operators] Add support for InputSelection to
MultipleInputStreamOperator
URL: https://github.com/apache/flink/pull/11529#discussion_r399277960
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleInputSelectionHandler.java
##########
@@ -112,7 +112,7 @@ int selectNextInputIndex(int lastReadInputIndex) {
}
boolean shouldSetAvailableForAnotherInput() {
- return availableInputsMask != allSelectedMask &&
inputSelection.areAllInputsSelected();
+ return (inputSelection.getInputMask() & allSelectedMask &
~availableInputsMask) != 0;
Review comment:
What's the problem? I think performance wise it doesn't matter, the `&
allSelectedMask` would still need to be there somewhere on the critical path.
From logic perspective, I actually prefer keeping `ALL` as valid value for
the `this.inputSelection` and doing the `& allSelectedMask` here, as those
extra bits are not an issue in general, but only for this particular line of
code (`!= 0` comparison).
----------------------------------------------------------------
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