temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Move task queue state validation logic from delete manager to task processing

Open yux0 opened this issue 3 years ago • 0 comments

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

yux0 avatar Sep 12 '22 20:09 yux0