Skip to content

Commit

Permalink
Use collInfo instead of reading again (#24784)
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia authored Jun 9, 2023
1 parent 223c8b2 commit 864c1bb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/proxy/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 864c1bb

Please sign in to comment.