125
// but CHASM only uses state-based replication, so we can continue to use
126
// GetOrCreateWorkflowExecution here.
128
>
ctx,
129
>
r.shardContext,
130
>
namespaceID,
131
>
&commonpb.WorkflowExecution{
132
>
WorkflowId: wid,
133
>
RunId: rid,
134
>
},
135
>
locks.PriorityHigh,
136
>
)
137
>
if err != nil {
138
return err
139
}
141
>
if rec := recover(); rec != nil {
142
releaseFn(errPanic)
143
panic(rec)
144
}
146
}()
147
148
// Handle existing workflows
150
>
switch err.(type) {
151
case *serviceerror.NotFound:
152
// no-op, continue to replicate workflow state