151
case *serviceerror.NotFound:
152
// no-op, continue to replicate workflow state
154
>
if len(request.WorkflowState.ExecutionInfo.TransitionHistory) != 0 {
155
return r.applySnapshotWhenWorkflowExist(ctx, namespaceID, wid, rid, chasm.WorkflowArchetypeID, wfCtx, releaseFn, ms, request.WorkflowState, nil, nil, request.RemoteCluster)
156
}
157
// workflow exists, do resend if version histories are not match.
158
>
localVersionHistory, err := versionhistory.GetCurrentVersionHistory(ms.GetExecutionInfo().GetVersionHistories())
workflow_state_replicator.go
159
>
if err != nil {
160
return err
161
}
163
>
if err != nil {
164
return err
165
}
166
>
incomingVersionHistory, err := versionhistory.GetCurrentVersionHistory(request.GetWorkflowState().GetExecutionInfo().GetVersionHistories())
workflow_state_replicator.go
167
>
if err != nil {
168
return err
169
}
171
>
if err != nil {
172
return err
173
}
175
return serviceerrors.NewRetryReplication(
176
"Failed to sync workflow state due to version history mismatch",