Browse Source

[Bug-14378][Master] Trigger task execution in workflow instance page cause workflow instance keep running status (#14389)

3.2.1-prepare
Aaron Wang 1 year ago committed by GitHub
parent
commit
64e5741063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

12
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

@ -2208,14 +2208,14 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatus> {
// remove task instance from taskInstanceMap, completeTaskSet, validTaskMap, errorTaskMap
// completeTaskSet remove dependency taskInstanceMap, so the sort can't change
completeTaskSet.removeIf(set -> {
Optional<TaskInstance> existTaskInstanceOptional = getTaskInstance(set);
completeTaskSet.removeIf(taskCode -> {
Optional<TaskInstance> existTaskInstanceOptional = getTaskInstance(taskCode);
return existTaskInstanceOptional
.filter(taskInstance -> dag.containsNode(Integer.toString(taskInstance.getId()))).isPresent();
.filter(taskInstance -> dag.containsNode(Long.toString(taskInstance.getTaskCode()))).isPresent();
});
taskInstanceMap.entrySet().removeIf(map -> dag.containsNode(Long.toString(map.getValue().getTaskCode())));
validTaskMap.entrySet().removeIf(map -> dag.containsNode(Long.toString(map.getKey())));
errorTaskMap.entrySet().removeIf(map -> dag.containsNode(Long.toString(map.getKey())));
taskInstanceMap.entrySet().removeIf(entry -> dag.containsNode(Long.toString(entry.getValue().getTaskCode())));
validTaskMap.entrySet().removeIf(entry -> dag.containsNode(Long.toString(entry.getKey())));
errorTaskMap.entrySet().removeIf(entry -> dag.containsNode(Long.toString(entry.getKey())));
}
private void saveCacheTaskInstance(TaskInstance taskInstance) {

Loading…
Cancel
Save