Skip to content

Commit

Permalink
Fix apache#16978 AbstractDelayEvent compare method is incorrect
Browse files Browse the repository at this point in the history
lile committed Jan 23, 2025
1 parent 82279d0 commit 8ee1049
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -130,6 +130,16 @@ 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;
}
logWarningIfCannotDoAction(taskExecutionRunnable, taskKillEvent);
}

0 comments on commit 8ee1049

Please sign in to comment.