Browse Source

[Fix-4839][Server] Process cannot stop when killed with retry (#4841)

* [Fix-4839][Server] Process cannot stop when killed with retry

* [Fix-4839][Server] Process cannot stop when killed with retry
pull/3/MERGE
dddyszy 4 years ago committed by GitHub
parent
commit
01b71f1a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskInstanceServiceImpl.java
  2. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java

4
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskInstanceServiceImpl.java

@ -167,8 +167,8 @@ public class TaskInstanceServiceImpl extends BaseServiceImpl implements TaskInst
return result; return result;
} }
// check whether the task instance state type is failure // check whether the task instance state type is failure or cancel
if (!task.getState().typeIsFailure()) { if (!task.getState().typeIsFailure() && !task.getState().typeIsCancel()) {
putMsg(result, Status.TASK_INSTANCE_STATE_OPERATION_ERROR, taskInstanceId, task.getState().toString()); putMsg(result, Status.TASK_INSTANCE_STATE_OPERATION_ERROR, taskInstanceId, task.getState().toString());
return result; return result;
} }

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java

@ -90,7 +90,7 @@ public enum ExecutionStatus {
* @return status * @return status
*/ */
public boolean typeIsFailure() { public boolean typeIsFailure() {
return this == FAILURE || this == NEED_FAULT_TOLERANCE || this == KILL; return this == FAILURE || this == NEED_FAULT_TOLERANCE;
} }
/** /**

Loading…
Cancel
Save