xiangtao commented on issue #14026:
URL:
https://github.com/apache/dolphinscheduler/issues/14026#issuecomment-1566162490
@ruanwenjun
it may be when submitTaskExec failed , so this taskFailedSubmit val = true ,
when taskInstanc status report to master ,
and update processInstance state in `updateProcessInstanceState` , it will
judge the status of the workflow instance as failed . as hasFailedTask .
`
private boolean hasFailedTask() {
if (this.taskFailedSubmit) {
return true;
}
if (this.errorTaskMap.size() > 0) {
return true;
}
return this.dependFailedTaskSet.size() > 0;
}
`
`
DependResult dependResult = getDependResultForTask(task);
if (DependResult.SUCCESS == dependResult) {
logger.info("The dependResult of task {} is success, so
ready to submit to execute", task.getName());
Optional<TaskInstance> taskInstanceOptional =
submitTaskExec(task);
if (!taskInstanceOptional.isPresent()) {
this.taskFailedSubmit = true;
// Remove and add to complete map and error map
if (!removeTaskFromStandbyList(task)) {
logger.error(
"Task submit failed, remove from standby
list failed, workflowInstanceId: {}, taskCode: {}",
processInstance.getId(),
task.getTaskCode());
}
completeTaskMap.put(task.getTaskCode(), task.getId());
taskInstanceMap.put(task.getId(), task);
errorTaskMap.put(task.getTaskCode(), task.getId());
activeTaskProcessorMaps.remove(task.getTaskCode());
logger.error("Task submitted failed, workflowInstanceId:
{}, taskInstanceId: {}, taskCode: {}",
task.getProcessInstanceId(),
task.getId(),
task.getTaskCode());
} else {
removeTaskFromStandbyList(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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]