109
}
110
111
>
func (tr *priTaskReader) completeTask(task *internalTask, res taskResponse) {
pri_task_reader.go
112
>
recordDroppedTask(tr.backlogMgr.metricsHandler, res.dropReason)
113
>
114
>
err := res.err()
115
>
116
>
// We can handle some transient errors by just putting the task back in the matcher to
117
>
// match again. Note that for forwarded tasks, it's expected to get DeadlineExceeded when
118
>
// the task doesn't match on the root after backlogTaskForwardTimeout, and also expected to
119
>
// get errRemoteSyncMatchFailed, which is a serviceerror.Canceled error.
120
>
if err != nil && (common.IsServiceClientTransientError(err) ||
121
>
common.IsContextDeadlineExceededErr(err) ||
122
>
common.IsContextCanceledErr(err)) {
123
// TODO(pri): if this was a start error (not a forwarding error): consider adding a
124
// per-task backoff here, in case the error was workflow busy, we don't want to end up