From 33525a17c3463d4bde56ae2335ecec38b24a5a6a Mon Sep 17 00:00:00 2001 From: eye-gu <734164350@qq.com> Date: Thu, 31 Aug 2023 18:34:31 +0800 Subject: [PATCH] [Fix-14828][master] check task id not null to avoid NPE (#14829) Co-authored-by: eye Co-authored-by: Aaron Wang Co-authored-by: caishunfeng --- .../server/master/runner/WorkflowExecuteRunnable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java index 9c5e65160f..12fed3ab56 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java @@ -1897,7 +1897,7 @@ public class WorkflowExecuteRunnable implements IWorkflowExecuteRunnable { TaskInstance task; while ((task = readyToSubmitTaskQueue.peek()) != null) { // stop tasks which is retrying if forced success happens - if (task.taskCanRetry()) { + if (task.getId() != null && task.taskCanRetry()) { TaskInstance retryTask = taskInstanceDao.queryById(task.getId()); if (retryTask != null && retryTask.getState().isForceSuccess()) { task.setState(retryTask.getState());