[DRAFT] Add initial implementation of parent close policy transfer task #8919
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Implementation of parent close policy transfer tasks. Parent close policies are applied for each child workflow when the parent is closed. During task generation when the workflow execution is closing, one parent close policy task will be created per child workflow, assuming the parent close policy is not to abandon the child workflow.
On the active task executor, the parent close policy task is handled by calling the corresponding Cancel/Terminate workflow API on the history client.
On the standby task executor, verification that the child workflow is closed or deleted is done by checking its mutable state. If the child workflow is not found, we need to defer to the state on the Source (active) cluster. The child workflow may not have been replicated.
Rollout Procedure
To roll this feature out safely, the following steps will be done:
history.enableParentClosePolicyTransferTasks = trueWhy?
System worker handling parent close policy tasks can lead to task dropping.
How did you test it?
Potential risks
TODO: Update section.