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
yihao.dai 2024-05-24 09:05:47 +08:00 committed by GitHub
parent b391781a2e
commit 592d701617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 1 deletions

View File

@ -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
} }