dolphinscheduler: [BUG] many dependent tasks depend on a node, task status bug

Describe the bug When many dependent tasks depend on a node and the dependent task supports failed retry, the task that submitted the retry will be judged as kill. causes process instance to fail.

I think, no need to verify process strategy when submitting tasks.

The method updateProcessInstanceState of the MasterExecThread class has been verify process strategy.

    private void updateProcessInstanceState() {
        ExecutionStatus state = getProcessInstanceState();
        if(processInstance.getState() != state){
    private ExecutionStatus getProcessInstanceState(){
        ProcessInstance instance = processService.findProcessInstanceById(processInstance.getId());
        ExecutionStatus state = instance.getState();

        if(activeTaskNode.size() > 0){
            return runningState(state);
        }
        // process failure
        if(processFailed()){
            return ExecutionStatus.FAILURE;
        }
    private Boolean processFailed(){
        if(hasFailedTask()) {
            if(processInstance.getFailureStrategy() == FailureStrategy.END){
                return true;
            }
            if (processInstance.getFailureStrategy() == FailureStrategy.CONTINUE) {
                return readyToSubmitTaskList.size() == 0 || activeTaskNode.size() == 0;
            }
        }
        return false;
    }

Which version of Dolphin Scheduler: -[1.2.0-preview]

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@lenboo The problem is the trigger point for the “strategy end”. I think the responsibilities should be clear. When submitting tasks, the task processing thread should only care about the state of the process instance. MasterExecThread controls the main process, and to check the “strategy end”. Unified caliber, instead of checking “strategy end” everywhere.

This is also the purpose of updating the process status before submitting the task.