}
count := atomic.AddInt32(counter, int32(token))
cleanup := func() { atomic.AddInt32(counter, -int32(token)) }
mh.Gauge(metrics.ServicePendingRequests.Name()).Record(float64(count))
concurrent_request_limit.go
// frontend.namespaceCount is applied per poller type temporarily to prevent
// one poller type to take all token waiting in the long poll.
if float64(count) > ni.quotaCalculator.GetQuota(namespaceName.String()) {
return cleanup, ErrNamespaceCountLimitServerBusy
}