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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/TwoInputSelectionHandler.java
##########
@@ -44,18 +49,27 @@ public TwoInputSelectionHandler(@Nullable InputSelectable 
inputSelectable) {
 
     void nextSelection() {
         if (inputSelectable == null) {
-            inputSelection = InputSelection.ALL;
+            selectedInputsMask = (int) InputSelection.ALL.getInputMask();
+        } else if (dataFinishedButNotPartition != 0) {
+            selectedInputsMask =
+                    ((int) inputSelectable.nextSelection().getInputMask()
+                            | dataFinishedButNotPartition);
         } else {
-            inputSelection = inputSelectable.nextSelection();
+            selectedInputsMask = (int) 
inputSelectable.nextSelection().getInputMask();
         }
     }
 
+    public boolean allInputsReceivedEndOfData() {
+        return (dataFinishedButNotPartition | inputsFinishedMask) == 3;
+    }
+
     int selectNextInputIndex(int lastReadInputIndex) {
-        return inputSelection.fairSelectNextIndexOutOf2(availableInputsMask, 
lastReadInputIndex);
+        return InputSelection.fairSelectNextIndexOutOf2(
+                selectedInputsMask, availableInputsMask, lastReadInputIndex);

Review comment:
       👍  but let's do (try) it before 1.14 feature freeze. Could you create 
(yet another) jira ticket for that? 




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