XComp commented on code in PR #21019:
URL: https://github.com/apache/flink/pull/21019#discussion_r993681403
##########
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:
I rephrased the condition that should never occur... Were you suggesting
that we should still wait for the concurrent operations to be completed?
:thinking: I didn't implement that because this specific state would mean that
there's some bug somewhere else. The Precondition should trigger the
`IllegalStateException` causing the JobGraph creation to fail.
--
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]