reele commented on code in PR #16980:
URL: 
https://github.com/apache/dolphinscheduler/pull/16980#discussion_r1926695493


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/statemachine/TaskFailureStateAction.java:
##########
@@ -130,6 +130,17 @@ public void killEventAction(final 
IWorkflowExecutionRunnable workflowExecutionRu
                                 final ITaskExecutionRunnable 
taskExecutionRunnable,
                                 final TaskKillLifecycleEvent taskKillEvent) {
         throwExceptionIfStateIsNotMatch(taskExecutionRunnable);
+        final IWorkflowExecutionGraph workflowExecutionGraph = 
taskExecutionRunnable.getWorkflowExecutionGraph();
+        // for now, killEventAction can be fired on failure with retry
+        // there is no task executor now, shouldn't call 
workflowExecutionGraph.isTaskExecutionRunnableActive()
+        // it's better to call super.killedEventAction() direct
+        if (taskExecutionRunnable.isTaskInstanceCanRetry()
+        // && 
workflowExecutionGraph.isTaskExecutionRunnableActive(taskExecutionRunnable)
+        ) {
+            super.killedEventAction(workflowExecutionRunnable, 
taskExecutionRunnable,
+                    TaskKilledLifecycleEvent.of(taskExecutionRunnable));
+            return;
+        }

Review Comment:
   >You can add a new private method for this, this logic also exist in 
killedEventAction
   sure.
   
   i need test 
`workflowExecutionGraph.isTaskExecutionRunnableActive(taskExecutionRunnable)` 
more for some case



-- 
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