未验证 提交 248bbc74 编写于 作者: S smellthemoon 提交者: GitHub

Fix GetCollectionID to return err (#26239)

Signed-off-by: Nlixinguo <xinguo.li@zilliz.com>
Co-authored-by: Nlixinguo <xinguo.li@zilliz.com>
上级 0f9aa5fb
...@@ -289,7 +289,7 @@ func (m *MetaCache) GetCollectionName(ctx context.Context, database string, coll ...@@ -289,7 +289,7 @@ func (m *MetaCache) GetCollectionName(ctx context.Context, database string, coll
} }
} }
method := "GeCollectionName" method := "GetCollectionName"
if collInfo == nil || !collInfo.isCollectionCached() { if collInfo == nil || !collInfo.isCollectionCached() {
metrics.ProxyCacheStatsCounter.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), method, metrics.CacheMissLabel).Inc() metrics.ProxyCacheStatsCounter.WithLabelValues(fmt.Sprint(paramtable.GetNodeID()), method, metrics.CacheMissLabel).Inc()
tr := timerecord.NewTimeRecorder("UpdateCache") tr := timerecord.NewTimeRecorder("UpdateCache")
......
...@@ -221,7 +221,11 @@ func (t *searchTask) PreExecute(ctx context.Context) error { ...@@ -221,7 +221,11 @@ func (t *searchTask) PreExecute(ctx context.Context) error {
t.SearchRequest.DbID = 0 // todo t.SearchRequest.DbID = 0 // todo
t.SearchRequest.CollectionID = collID 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) partitionKeyMode, err := isPartitionKeyMode(ctx, t.request.GetDbName(), collectionName)
if err != nil { if err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册