five111 opened a new issue #229:
URL: https://github.com/apache/servicecomb-kie/issues/229


   ```
   func PreCreate(service, domain, project, resource string, number int64) 
error {
        if defaultManager == nil {
                openlog.Debug("quota management not available")
                return nil
        }
        qs, err := defaultManager.GetQuotas(service, domain, project)
        if err != nil {
                openlog.Error(err.Error())
                return ErrGetFailed
        }
        var resourceQuota *Quota
        for _, q := range qs {
                if q.ResourceName == resource {
                        resourceQuota = q
                        break
                }
        }
        if resourceQuota == nil {
                //no limits
                openlog.Debug("no limits for " + resource)
                return nil
        }
        if number > resourceQuota.Limit-resourceQuota.Used {
                return ErrReached
        }
        return nil
   }
   ```
   配额的维度是和 service , domain, project 相关的
   这里的domain和project可以说是从请求参数中读取的
   但是service这个 从命名来看是和服务挂钩的,这个维度在请求时该如何体现
   做性能测试时 发现默认最大就10000, 这个配额该如何配置?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to