108
func (tm *TaskMatcher) Offer(ctx context.Context, task *internalTask) (bool, error) {
109
if !tm.isBacklogNegligible() {
110
>
// To ensure better dispatch ordering, we block sync match when a significant backlog is present.
matcher.go
111
>
// Note that this check does not make a noticeable difference for history tasks, as they do not wait for a
112
>
// poller to become available. In presence of a backlog the chance of a poller being available when sync match
113
>
// request comes is almost zero.
114
>
// This check is mostly effective for the sync match requests that come from child partitions for spooled tasks.
115
>
return false, nil
116
>
}
117
118
if !task.isForwarded() {