263
}
264
266
>
if err != nil {
267
return err
268
}
269
271
release(nil) // release(nil) so that the mutable state is not unloaded from cache
272
return consts.ErrWorkflowCompleted
273
}
274
276
>
directive := MakeDirectiveForActivityTask(mutableState, ai)
277
>
priority := priorities.Merge(mutableState.GetExecutionInfo().Priority, ai.Priority)
278
>
279
>
// NOTE: do not access anything related mutable state after this lock release
280
>
// release the context lock since we no longer need mutable state and
281
>
// the rest of logic is making RPC call, which takes time.
282
>
release(nil)
283
>
284
>
return t.pushActivity(ctx, task, timeout, directive, priority, historyi.TransactionPolicyActive)
285
}
286