Returns collection instead of copy to make leaderMutex work (#17206)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/17216/head
congqixia 2022-05-25 15:20:00 +08:00 committed by GitHub
parent de0ba6d495
commit e06d6d7cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -216,15 +216,7 @@ func (m *MetaCache) GetCollectionInfo(ctx context.Context, collectionName string
}
metrics.ProxyCacheHitCounter.WithLabelValues(strconv.FormatInt(Params.ProxyCfg.GetNodeID(), 10), "GetCollectionInfo", metrics.CacheHitLabel).Inc()
return &collectionInfo{
collID: collInfo.collID,
schema: collInfo.schema,
partInfo: collInfo.partInfo,
createdTimestamp: collInfo.createdTimestamp,
createdUtcTimestamp: collInfo.createdUtcTimestamp,
shardLeaders: collInfo.shardLeaders,
isLoaded: collInfo.isLoaded,
}, nil
return collInfo, nil
}
func (m *MetaCache) GetCollectionSchema(ctx context.Context, collectionName string) (*schemapb.CollectionSchema, error) {