35
func SanitizeMutableState(
36
workflowMutableState *persistencespb.WorkflowMutableState,
38
>
// Some values stored in mutable state are cluster or shard specific.
39
>
// E.g task status (if task is created or not), taskID (derived from shard rangeID), txnID (derived from shard rangeID), etc.
40
>
// Those fields should not be replicated across clusters and should be sanitized.
41
>
sanitizeExecutionInfo(workflowMutableState.ExecutionInfo)
42
>
43
>
sanitizeChildExecutionInfo(workflowMutableState.ChildExecutionInfos)
44
>
45
>
rootNode := persistencespb.StateMachineNode{
46
>
Children: workflowMutableState.ExecutionInfo.SubStateMachinesByType,
47
>
}
48
>
SanitizeStateMachineNode(&rootNode)
49
>
}
50
51
func SanitizeMutableStateMutation(