mirror of https://github.com/milvus-io/milvus.git
Fix GetCollectionID to return err (#26239)
Signed-off-by: lixinguo <xinguo.li@zilliz.com> Co-authored-by: lixinguo <xinguo.li@zilliz.com>pull/26264/head
parent
0f9aa5fbec
commit
248bbc749d
|
@ -289,7 +289,7 @@ func (m *MetaCache) GetCollectionName(ctx context.Context, database string, coll
|
|||
}
|
||||
}
|
||||
|
||||
method := "GeCollectionName"
|
||||
method := "GetCollectionName"
|
||||
if collInfo == nil || !collInfo.isCollectionCached() {
|
||||
metrics.ProxyCacheStatsCounter.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), method, metrics.CacheMissLabel).Inc()
|
||||
tr := timerecord.NewTimeRecorder("UpdateCache")
|
||||
|
|
|
@ -221,7 +221,11 @@ func (t *searchTask) PreExecute(ctx context.Context) error {
|
|||
|
||||
t.SearchRequest.DbID = 0 // todo
|
||||
t.SearchRequest.CollectionID = collID
|
||||
t.schema, _ = globalMetaCache.GetCollectionSchema(ctx, t.request.GetDbName(), collectionName)
|
||||
t.schema, err = globalMetaCache.GetCollectionSchema(ctx, t.request.GetDbName(), collectionName)
|
||||
if err != nil {
|
||||
log.Warn("get collection schema failed", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
|
||||
partitionKeyMode, err := isPartitionKeyMode(ctx, t.request.GetDbName(), collectionName)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue