296
}
297
298
>
func (s *SyncStateRetrieverImpl) getNewRunInfo(ctx context.Context, namespaceId namespace.ID, execution *commonpb.WorkflowExecution, newRunId string) (_ *replicationspb.NewRunInfo, retError error) {
sync_state_retriever.go
299
>
// CHASM runs don't have new run, so can continue to use GetOrCreateWorkflowExecution here.
300
>
wfCtx, releaseFunc, err := s.workflowCache.GetOrCreateWorkflowExecution(
301
>
ctx,
302
>
s.shardContext,
303
>
namespaceId,
304
>
&commonpb.WorkflowExecution{
305
>
WorkflowId: execution.WorkflowId,
306
>
RunId: newRunId,
307
>
},
308
>
locks.PriorityLow,
309
>
)
310
>
defer func() {
311
>
if releaseFunc != nil {
312
releaseFunc(retError)
313
}
314
}()
315
317
return nil, err
318
}
320
>
switch err.(type) {
321
case nil:
322
case *serviceerror.NotFound: