Fix read quota queue len calculate twice (#24440)

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2023-06-20 14:22:42 +08:00 committed by GitHub
parent 1b2f6d3443
commit 072cbf0353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,10 +363,9 @@ func (q *QuotaCenter) calculateReadRates() {
return ri.UnsolvedQueue + ri.ReadyQueue + ri.ReceiveChan + ri.ExecuteChan
}
for _, metric := range q.queryNodeMetrics {
searchNQSum := sum(metric.SearchQueue)
queryTasksSum := sum(metric.QueryQueue)
nqInQueue := searchNQSum + queryTasksSum // We think of the NQ of query request as 1.
if nqInQueue >= nqInQueueThreshold {
// We think of the NQ of query request as 1.
// search use same queue with query
if sum(metric.SearchQueue) >= nqInQueueThreshold {
limitCollectionSet.Insert(metric.Effect.CollectionIDs...)
}
}