70
ctx context.Context,
71
request *historyservice.SyncActivityRequest,
73
>
74
>
// sync activity info will only be sent from active side, when
75
>
// 1. activity retry
76
>
// 2. activity start
77
>
// 3. activity heart beat
78
>
// no sync activity task will be sent when active side fail / timeout activity,
79
>
namespaceID := namespace.ID(request.GetNamespaceId())
80
>
execution := commonpb.WorkflowExecution{
81
>
WorkflowId: request.WorkflowId,
82
>
RunId: request.RunId,
83
>
}
84
>
85
>
executionContext, release, err := r.workflowCache.GetOrCreateWorkflowExecution(
86
>
ctx,
87
>
r.shardContext,
88
>
namespaceID,
89
>
&execution,
90
>
locks.PriorityHigh,
91
>
)
92
>
if err != nil {
93
// for get workflow execution context, with valid run id
94
// err will not be of type EntityNotExistsError
95
return err
96
}
98
100
>
if err != nil {
101
if _, isNotFound := err.(*serviceerror.NotFound); isNotFound {
102
// this can happen if the workflow start event and this sync activity task are out of order