mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Fix concurrent map read/write in rate limiter (#23958)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
3827ac30bc
commit
f6d3b4f7ac
@ -70,6 +70,9 @@ func (m *MultiRateLimiter) Check(collectionID int64, rt internalpb.RateType, n i
|
|||||||
return commonpb.ErrorCode_Success
|
return commonpb.ErrorCode_Success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m.quotaStatesMu.RLock()
|
||||||
|
defer m.quotaStatesMu.RUnlock()
|
||||||
|
|
||||||
limiter := m.collectionLimiters[collectionID]
|
limiter := m.collectionLimiters[collectionID]
|
||||||
if limiter == nil {
|
if limiter == nil {
|
||||||
return commonpb.ErrorCode_Success
|
return commonpb.ErrorCode_Success
|
||||||
|
Loading…
Reference in New Issue
Block a user