This is an automated email from the ASF dual-hosted git repository.
leonbao pushed a commit to branch 2.0.1-release
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.1-release by this push:
new 5dad635 [cherry-pick-2.0.1][Bug-7307][MasterServer] timeout event was
filtered (#7303)
5dad635 is described below
commit 5dad635ff0ace00842a5b24a82b5d31e0882d930
Author: wind <[email protected]>
AuthorDate: Fri Dec 10 12:04:40 2021 +0800
[cherry-pick-2.0.1][Bug-7307][MasterServer] timeout event was filtered
(#7303)
* remove task filter when task timeout
* get lastest task instance info
Co-authored-by: caishunfeng <[email protected]>
---
.../server/master/runner/WorkflowExecuteThread.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
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 3b2ddca..4e3349a 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
@@ -317,14 +317,14 @@ public class WorkflowExecuteThread implements Runnable {
private boolean taskTimeout(StateEvent stateEvent) {
- if (taskInstanceHashMap.containsRow(stateEvent.getTaskInstanceId())) {
+ if (!taskInstanceHashMap.containsRow(stateEvent.getTaskInstanceId())) {
return true;
}
- TaskInstance taskInstance = taskInstanceHashMap
- .row(stateEvent.getTaskInstanceId())
- .values()
- .iterator().next();
+ // get lastest task instance into
+ TaskInstance taskInstance =
processService.findTaskInstanceById(stateEvent.getTaskInstanceId());
+ TaskDefinition taskDefinition =
processService.findTaskDefinition(taskInstance.getTaskCode(),
taskInstance.getTaskDefinitionVersion());
+ taskInstance.setTaskDefine(taskDefinition);
if (TimeoutFlag.CLOSE ==
taskInstance.getTaskDefine().getTimeoutFlag()) {
return true;
@@ -704,7 +704,6 @@ public class WorkflowExecuteThread implements Runnable {
}
}
-
/**
* find task instance in db.
* in case submit more than one same name task in the same time.