You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/11/24 11:00:53 UTC

[dolphinscheduler] branch dev updated: [Bug-12963] [Master] Fix dependent task node null pointer exception (#12965)

This is an automated email from the ASF dual-hosted git repository.

kerwin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 50779ea1e6 [Bug-12963] [Master] Fix dependent task node null pointer exception (#12965)
50779ea1e6 is described below

commit 50779ea1e6acdbca721dcc3d6331e13687ac9544
Author: Kerwin <37...@users.noreply.github.com>
AuthorDate: Thu Nov 24 19:00:46 2022 +0800

    [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.
---
 .../apache/dolphinscheduler/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 a28ee36cb0..9124a6f1a7 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
@@ -205,8 +205,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;
     }
 
     /**