reele commented on code in PR #16980:
URL:
https://github.com/apache/dolphinscheduler/pull/16980#discussion_r1926513567
##########
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:
it's not test code, before this pr, the kill event always triggered after
retry event, so the kill action always fire in submitted state.
this code use to finish the workflow's Topology graph.
--
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]