Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/378#discussion_r24415175
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
 ---
    @@ -416,13 +426,26 @@ boolean 
scheduleOrUpdateConsumers(List<List<ExecutionEdge>> consumers) throws Ex
                        final ExecutionState consumerState = 
consumerVertex.getExecutionState();
     
                        if (consumerState == CREATED) {
    -                           if (state == RUNNING) {
    -                                   if 
(!consumerVertex.scheduleForExecution(consumerVertex.getExecutionGraph().getScheduler(),
 false)) {
    -                                           success = false;
    +                           
consumerVertex.cachePartitionInfo(PartialPartitionInfo.fromEdge(edge));
    +
    +                           future(new Callable<Boolean>(){
    +                                   @Override
    +                                   public Boolean call() throws Exception {
    +                                           try {
    +                                                   
consumerVertex.scheduleForExecution(
    +                                                           
consumerVertex.getExecutionGraph().getScheduler(), false);
    +                                           } catch (Exception exception) {
    +                                                   fail(new 
IllegalStateException("Could not schedule consumer " +
    +                                                                   "vertex 
" + consumerVertex, exception));
    +                                           }
    +
    +                                           return true;
                                        }
    -                           }
    -                           else {
    -                                   success = false;
    +                           }, AkkaUtils.globalExecutionContext());
    +
    +                           // double check to resolve race conditions
    +                           if(consumerVertex.getExecutionState() == 
RUNNING){
    +                                   consumerVertex.sendPartitionInfos();
    --- End diff --
    
    Just to verify: the double check & send relies on the fact that update 
messages at the task manager are idempotent, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to