azagrebin commented on a change in pull request #7255: [FLINK-10945] Use 
InputDependencyConstraint to avoid resource dead…
URL: https://github.com/apache/flink/pull/7255#discussion_r241102356
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
 ##########
 @@ -755,23 +775,10 @@ else if (numConsumers == 0) {
                                // TODO The current approach may send many 
update messages even though the consuming
                                // task has already been deployed with all 
necessary information. We have to check
                                // whether this is a problem and fix it, if it 
is.
-                               CompletableFuture.supplyAsync(
-                                       () -> {
-                                               try {
-                                                       final ExecutionGraph 
executionGraph = consumerVertex.getExecutionGraph();
-                                                       
consumerVertex.scheduleForExecution(
-                                                               
executionGraph.getSlotProvider(),
-                                                               
executionGraph.isQueuedSchedulingAllowed(),
-                                                               
LocationPreferenceConstraint.ANY, // there must be at least one known location
-                                                               
Collections.emptySet());
-                                               } catch (Throwable t) {
-                                                       consumerVertex.fail(new 
IllegalStateException("Could not schedule consumer " +
-                                                                       "vertex 
" + consumerVertex, t));
-                                               }
-
-                                               return null;
-                                       },
-                                       executor);
+                               if 
(consumerVertex.checkInputDependencyConstraints()) {
 
 Review comment:
   I think the TODO comment belongs to the first line of the new 
`scheduleConsumer` method

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to