zentol commented on code in PR #21019:
URL: https://github.com/apache/flink/pull/21019#discussion_r994476666


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java:
##########
@@ -298,6 +303,27 @@ private JobGraph createJobGraph() {
         return jobGraph;
     }
 
+    private void waitForSerializationFuturesAndUpdateJobVertices()
+            throws ExecutionException, InterruptedException {
+        for (JobVertex jobVertex : jobGraph.getVertices()) {
+            final 
List<CompletableFuture<SerializedValue<OperatorCoordinator.Provider>>>
+                    futuresForJobVertex = 
coordinatorSerializationFutures.remove(jobVertex.getID());
+            if (futuresForJobVertex == null) {
+                LOG.warn(
+                        "No OperatorCoordinator creator serialized for 
JobVertex {}.",
+                        jobVertex.getID());
+            } else {
+                FutureUtils.combineAll(futuresForJobVertex)
+                        .get()
+                        .forEach(jobVertex::addOperatorCoordinator);
+            }
+        }
+        Preconditions.checkState(
+                coordinatorSerializationFutures.isEmpty(),
+                "There are still serialization futures not processed for 
JobVertex instances: {}",

Review Comment:
   We shouldn't wait. If this happens something added a coordinator while we 
were already inserting them; and we should fail hard when that happens.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to