From 508ed9769aebe70a87539eccb70b6a08d34e0183 Mon Sep 17 00:00:00 2001 From: sparklezzz Date: Mon, 18 Apr 2022 20:34:22 +0800 Subject: [PATCH] [Fix][Master Server] handle warn+failed timeout strategy in workflow execute thread of master server (#8077) (#9485) Co-authored-by: xudong.zhang --- .../server/master/runner/WorkflowExecuteThread.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index 75a621bd43..8e20f92ead 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -382,10 +382,11 @@ public class WorkflowExecuteThread { return true; } TaskTimeoutStrategy taskTimeoutStrategy = taskInstance.getTaskDefine().getTimeoutNotifyStrategy(); - if (TaskTimeoutStrategy.FAILED == taskTimeoutStrategy) { + if (TaskTimeoutStrategy.FAILED == taskTimeoutStrategy || TaskTimeoutStrategy.WARNFAILED == taskTimeoutStrategy) { ITaskProcessor taskProcessor = activeTaskProcessorMaps.get(taskInstance.getTaskCode()); taskProcessor.action(TaskAction.TIMEOUT); - } else { + } + if (TaskTimeoutStrategy.WARN == taskTimeoutStrategy || TaskTimeoutStrategy.WARNFAILED == taskTimeoutStrategy) { ProjectUser projectUser = processService.queryProjectWithUserByProcessInstanceId(processInstance.getId()); processAlertManager.sendTaskTimeoutAlert(processInstance, taskInstance, projectUser); }