Use collInfo instead of reading again (#24784)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/24788/head
congqixia 2023-06-09 20:26:35 +08:00 committed by GitHub
parent 223c8b24e3
commit 864c1bbcee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -384,9 +384,7 @@ 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
partInfo := collInfo.partInfo
for k, v := range partInfo {
ret[k] = v.partitionID
}