tillrohrmann commented on a change in pull request #7568: [FLINK-11417] Make 
access to ExecutionGraph single threaded from JobMaster main thread
URL: https://github.com/apache/flink/pull/7568#discussion_r250626117
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
 ##########
 @@ -962,26 +986,26 @@ public void scheduleForExecution() throws JobException {
                // the future fails once one slot future fails.
                final ConjunctFuture<Collection<Execution>> 
allAllocationsFuture = FutureUtils.combineAll(allAllocationFutures);
 
-               final CompletableFuture<Void> currentSchedulingFuture = 
allAllocationsFuture
-                       .thenAccept(
-                               (Collection<Execution> executionsToDeploy) -> {
-                                       for (Execution execution : 
executionsToDeploy) {
-                                               try {
-                                                       execution.deploy();
-                                               } catch (Throwable t) {
-                                                       throw new 
CompletionException(
-                                                               new 
FlinkException(
-                                                                       
String.format("Could not deploy execution %s.", execution),
-                                                                       t));
-                                               }
+               return FutureUtils.thenAcceptAsyncIfNotDone(
+                       allAllocationsFuture,
 
 Review comment:
   Same for the `allAllocationsFuture`. If we guarantee that each allocation 
future is completed from within the main thread, then we should not need to 
call an async callback here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to