-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem? Please describe.
Currently, the behavior of delete workflow execution depends on the state of the task processing. (https://github.com/temporalio/temporal/blob/master/service/history/workflow/delete_manager.go#L117-L147)
This is not a good model to understanding. We should move this part into task processing.
Describe the solution you'd like
It compares the ack levels in transfer queue and visibility queue.
In transfer queue, when processing a delete task, it can load the mutable state to get the close transfer task id. Then it knows if it is ok to process the task.
In visibility queue, we need to store the closed visibility task id as the mutable state may be deleted prior to this task.
Describe alternatives you've considered
Check the visibility queue state when processing the deletion transfer task. But this is not a good option as it couples two queues.
Additional context