lenboo commented on issue #2112: [BUG] many dependent tasks depend on a node, 
task status bug
URL: 
https://github.com/apache/incubator-dolphinscheduler/issues/2112#issuecomment-599950138
 
 
   > New modification plan:
   > 1.The method runProcess() of the MasterExecThread class. Update instance 
status before submitting task.
   > 
   > ```
   >             updateProcessInstanceState();
   > 
   >             if (canSubmitTaskToQueue()) {
   >                 submitStandByTask();
   >             }
   > 
   >             if (processInstance.IsProcessInstanceStop()) {
   >                 break;
   >             }
   > 
   >             try {
   >                 Thread.sleep(Constants.SLEEP_TIME_MILLIS);
   >             } catch (InterruptedException e) {
   >                 logger.error(e.getMessage(),e);
   >             }
   > ```
   > 
   > 2.The method getSubmitTaskState() of the ProcessDao class. If instance 
status is failure, the task status is set to kill.
   > 
   > ```
   >         if( processInstanceState == ExecutionStatus.READY_PAUSE){
   >             state = ExecutionStatus.PAUSE;
   >         }else if(processInstanceState == ExecutionStatus.READY_STOP
   >                 || processInstanceState == ExecutionStatus.FAILURE) {
   >             state = ExecutionStatus.KILL;
   >         }else{
   >             state = ExecutionStatus.SUBMITTED_SUCCESS;
   >         }
   > ```
   > 
   > @lenboo
   
   the order of submission task and updating state is not very important.
   in dolphinscheduler, master and worker run asynchronously,   the "strategy 
end" can be  triggered at any time, maybe between updating process state and 
submitting the next tasks. so the strategy checking  is  necessary when 
submitting task. 
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to