Skip to content

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

@yux0

Description

@yux0

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

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions