mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix data race in MetaCache (#24739)
Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
parent
d6dea8bcbb
commit
fa69c71d35
@ -384,6 +384,8 @@ func (m *MetaCache) GetPartitions(ctx context.Context, collectionName string) (m
|
||||
metrics.ProxyCacheStatsCounter.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), "GetPartitions", metrics.CacheHitLabel).Inc()
|
||||
|
||||
ret := make(map[string]typeutil.UniqueID)
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
partInfo := m.collInfo[collectionName].partInfo
|
||||
for k, v := range partInfo {
|
||||
ret[k] = v.partitionID
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user