ruanwenjun commented on code in PR #16980:
URL:
https://github.com/apache/dolphinscheduler/pull/16980#discussion_r1926701394
##########
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:
OK, `workflowExecutionGraph.isTaskExecutionRunnableActive` is used to judge
whether a task is still `running`, once a task is inactive, then means it will
never be triggered.
--
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]