mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix querycoord ut data race (#17980)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
parent
641fb96958
commit
47c9e77155
@ -280,11 +280,13 @@ func (qs *queryNodeServerMock) GetMetrics(ctx context.Context, req *milvuspb.Get
|
||||
}
|
||||
|
||||
totalMemUsage := uint64(0)
|
||||
globalSegInfosMutex.RLock()
|
||||
for _, info := range qs.segmentInfos {
|
||||
if nodeIncluded(qs.queryNodeID, info.NodeIds) {
|
||||
totalMemUsage += uint64(info.MemSize)
|
||||
}
|
||||
}
|
||||
globalSegInfosMutex.RUnlock()
|
||||
nodeInfos := metricsinfo.QueryNodeInfos{
|
||||
BaseComponentInfos: metricsinfo.BaseComponentInfos{
|
||||
Name: metricsinfo.ConstructComponentName(typeutil.QueryNodeRole, qs.queryNodeID),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user