From d4c6ec4fa1e55394ebb769cb21afb2894a152bb2 Mon Sep 17 00:00:00 2001 From: Kerwin <37063904+zhuangchong@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:00:46 +0800 Subject: [PATCH] [Bug-12963] [Master] Fix dependent task node null pointer exception (#12965) * Fix that there are both manual and scheduled workflow instances in dependent nodes, and one of them will report a null pointer exception during execution. --- .../server/master/utils/DependentExecute.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java index 1312bc0b61..aaad08320a 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java @@ -199,8 +199,8 @@ public class DependentExecute { return lastManualProcess; } - return (lastManualProcess.getEndTime().after(lastSchedulerProcess.getEndTime())) ? lastManualProcess - : lastSchedulerProcess; + // In the time range, there are both manual and scheduled workflow instances, return the last workflow instance + return lastManualProcess.getId() > lastSchedulerProcess.getId() ? lastManualProcess : lastSchedulerProcess; } /**