Skip to content

Commit 5867bee

Browse files
authored
Fix task instance which status is dispatch will not be failover (apache#16107)
1 parent 4f6e715 commit 5867bee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,12 +1219,12 @@ private void submitPostNode(Long parentNodeCode) throws StateEventHandleExceptio
12191219
|| state == TaskExecutionStatus.DISPATCH
12201220
|| state == TaskExecutionStatus.SUBMITTED_SUCCESS
12211221
|| state == TaskExecutionStatus.DELAY_EXECUTION) {
1222-
// try to take over task instance
1223-
if (state == TaskExecutionStatus.SUBMITTED_SUCCESS || state == TaskExecutionStatus.DELAY_EXECUTION
1224-
|| state == TaskExecutionStatus.DISPATCH) {
1222+
if (state == TaskExecutionStatus.SUBMITTED_SUCCESS
1223+
|| state == TaskExecutionStatus.DELAY_EXECUTION) {
12251224
// The taskInstance is not in running, directly takeover it
12261225
} else if (tryToTakeOverTaskInstance(existTaskInstance)) {
1227-
log.info("Success take over task {}", existTaskInstance.getName());
1226+
// If the taskInstance has already dispatched to worker then will try to take-over it
1227+
log.info("Success take over task {} -> status: {}", existTaskInstance.getName(), state);
12281228
continue;
12291229
} else {
12301230
// set the task instance state to fault tolerance

0 commit comments

Comments
 (0)