75
mutableState historyi.MutableState,
76
minVersionedTransition *persistencespb.VersionedTransition,
78
>
if transitionhistory.Compare(minVersionedTransition, EmptyVersionedTransition) == 0 {
79
>
// Reset all the state machine timers, we'll recreate them all.
80
>
mutableState.GetExecutionInfo().StateMachineTimers = nil
81
>
return nil
82
>
}
83
85
>
trimmedStateMachineTimers := make([]*persistencespb.StateMachineTimerGroup, 0, len(mutableState.GetExecutionInfo().StateMachineTimers))
86
>
for _, timerGroup := range mutableState.GetExecutionInfo().StateMachineTimers {
87
>
trimmedTaskInfos := make([]*persistencespb.StateMachineTaskInfo, 0, len(timerGroup.Infos))
88
>
for _, taskInfo := range timerGroup.GetInfos() {
89
>
90
>
node, err := hsmRoot.Child(hsm.Ref{
91
>
StateMachineRef: taskInfo.Ref,
92
>
}.StateMachinePath())
93
>
if err != nil {
94
if errors.Is(err, hsm.ErrStateMachineNotFound) {
95
// node deleted, trim the task