mirror of https://github.com/milvus-io/milvus.git
fix: Fix global rate limit is not working (#33335)
If the request is limited by rate limiter, limiter should not "Cancel". This is because, if limited, tokens are not deducted; instead, "Cancel" operation would increase the token count. issue: https://github.com/milvus-io/milvus/issues/31705 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/33351/head
parent
b391781a2e
commit
592d701617
|
@ -78,7 +78,6 @@ func (m *SimpleLimiter) Check(dbID int64, collectionIDToPartIDs map[int64][]int6
|
||||||
ret := clusterRateLimiters.Check(rt, n)
|
ret := clusterRateLimiters.Check(rt, n)
|
||||||
|
|
||||||
if ret != nil {
|
if ret != nil {
|
||||||
clusterRateLimiters.Cancel(rt, n)
|
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue