curcur commented on a change in pull request #16714:
URL: https://github.com/apache/flink/pull/16714#discussion_r685753095



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
##########
@@ -123,9 +128,28 @@
         return mergeMapList;
     }
 
-    /** Collect union states from given parallelSubtaskStates. */
     private Map<String, List<Tuple2<StreamStateHandle, 
OperatorStateHandle.StateMetaInfo>>>
             collectUnionStates(List<List<OperatorStateHandle>> 
parallelSubtaskStates) {
+        return collectStates(parallelSubtaskStates, 
OperatorStateHandle.Mode.UNION);
+    }
+
+    private Map<String, List<Tuple2<StreamStateHandle, 
OperatorStateHandle.StateMetaInfo>>>
+            collectPartlyFinishedBroadcastStates(
+                    List<List<OperatorStateHandle>> parallelSubtaskStates) {
+        return collectStates(parallelSubtaskStates, 
OperatorStateHandle.Mode.BROADCAST).entrySet()
+                .stream()
+                .filter(
+                        e ->
+                                e.getValue().size() > 0
+                                        && e.getValue().size() < 
parallelSubtaskStates.size())

Review comment:
       My guess is that the empty state should be `e.getValue().size() == 0` ?




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