Fix read wrong variable caused nil error (#22296)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/22257/head
congqixia 2023-02-20 17:28:26 +08:00 committed by GitHub
parent 03eb17ad2c
commit c8032f7e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ func (m *MetaCache) GetShards(ctx context.Context, withCache bool, collectionNam
if shardLeaders != nil {
metrics.ProxyCacheStatsCounter.WithLabelValues(strconv.FormatInt(Params.ProxyCfg.GetNodeID(), 10), method, metrics.CacheHitLabel).Inc()
iterator := info.shardLeaders.GetReader()
iterator := shardLeaders.GetReader()
return iterator.Shuffle(), nil
}