dawidwys commented on a change in pull request #16589:
URL: https://github.com/apache/flink/pull/16589#discussion_r678817768



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleInputSelectionHandler.java
##########
@@ -101,20 +114,26 @@ public DataInputStatus calculateOverallStatus() throws 
IOException {
     }
 
     void nextSelection() {
-        if (inputSelectable == null) {
-            inputSelection = InputSelection.ALL;
+        if (inputSelectable == null || areAllDataInputsFinished()) {
+            selectedInputsMask = InputSelection.ALL.getInputMask();
+        } else if (dataFinishedButNotPartition != 0) {
+            selectedInputsMask =
+                    (inputSelectable.nextSelection().getInputMask() | 
dataFinishedButNotPartition)
+                            & allSelectedMask;
         } else {
-            inputSelection = inputSelectable.nextSelection();
+            selectedInputsMask = 
inputSelectable.nextSelection().getInputMask();

Review comment:
       Per my personal taste it's not cleaner, but I am not arguing against 
faster. I updated it as per your suggestion.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to