WangJPLeo commented on code in PR #9955:
URL: https://github.com/apache/dolphinscheduler/pull/9955#discussion_r869578228


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java:
##########
@@ -417,8 +417,12 @@ private boolean taskStateChangeHandler(StateEvent 
stateEvent) {
         }
         if (activeTaskProcessorMaps.containsKey(task.getTaskCode())) {
             ITaskProcessor iTaskProcessor = 
activeTaskProcessorMaps.get(task.getTaskCode());
-            iTaskProcessor.action(TaskAction.RUN);
-
+            // pending task needs to be dispatched
+            if (task.getState().typeIsPending()){

Review Comment:
   Thanks, the consideration here is that the task instance in the Pending 
state needs to be dispatched when a failover occurs, I reconfirmed the test and 
found that this is not the case. But the interesting thing is that a historical 
problem was discovered during the period, the selected task instance was 
recreated when the Master service failed over. The executed task instance is 
re-created, causing the execution of the new task instance to resume 
successfully, The old task instance will not change anything and generate 
garbage data. This problem will be written in Issues and will be resolved in 
the next PR. Finally thank you again for your review.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to