178
ctx context.Context,
179
request *historyservice.SyncActivitiesRequest,
181
>
// sync activity info will only be sent from active side, when
182
>
// 1. activity retry
183
>
// 2. activity start
184
>
// 3. activity heart beat
185
>
// no sync activity task will be sent when active side fail / timeout activity,
186
>
namespaceID := namespace.ID(request.GetNamespaceId())
187
>
execution := &commonpb.WorkflowExecution{
188
>
WorkflowId: request.WorkflowId,
189
>
RunId: request.RunId,
190
>
}
191
>
192
>
executionContext, release, err := r.workflowCache.GetOrCreateWorkflowExecution(
193
>
ctx,
194
>
r.shardContext,
195
>
namespaceID,
196
>
execution,
197
>
locks.PriorityHigh,
198
>
)
199
>
if err != nil {
200
// for get workflow execution context, with valid run id
201
// err will not be of type EntityNotExistsError
202
return err
203
}
205
207
>
if err != nil {
208
if _, isNotFound := err.(*serviceerror.NotFound); isNotFound {
209
// this can happen if the workflow start event and this sync activity task are out of order