This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch 2.0.8-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.8-prepare by this push:
new 02a53f59ab [Fix-13409] [Worker] concurrent task response occasional
cause status error (#13433)
02a53f59ab is described below
commit 02a53f59ab63f1daa2394b01608598179fac8ef7
Author: JinYong Li <[email protected]>
AuthorDate: Thu Jan 19 16:20:51 2023 +0800
[Fix-13409] [Worker] concurrent task response occasional cause status error
(#13433)
---
.../server/master/runner/WorkflowExecuteThread.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
index 9dfac7bffc..2dba7b2a18 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
@@ -46,6 +46,7 @@ import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.model.TaskNodeRelation;
import org.apache.dolphinscheduler.common.process.ProcessDag;
import org.apache.dolphinscheduler.common.process.Property;
+import org.apache.dolphinscheduler.common.thread.ThreadUtils;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.common.utils.NetUtils;
@@ -404,9 +405,14 @@ public class WorkflowExecuteThread implements Runnable {
return true;
}
if (task.getState().typeIsFinished()) {
- if
(completeTaskList.containsKey(Long.toString(task.getTaskCode())) &&
completeTaskList.get(Long.toString(task.getTaskCode())).getId() ==
task.getId()) {
+ if
(completeTaskList.containsKey(Long.toString(task.getTaskCode())) &&
completeTaskList.get(Long.toString(task.getTaskCode())).getId() == task.getId()
+ && task.getState() != ExecutionStatus.NEED_FAULT_TOLERANCE) {
return true;
}
+ if (task.getStartTime() == null) {
+ logger.info("Maybe TASK_EXECUTE_ACK has not been received when
the task finish, will wait for one second");
+ ThreadUtils.sleep(Constants.SLEEP_TIME_MILLIS);
+ }
taskFinished(task);
return true;
}