From c522ce84b4c57464d98af15c5d73269a68478d5c Mon Sep 17 00:00:00 2001 From: zhagnlu <1542303831@qq.com> Date: Sun, 8 Dec 2024 17:20:40 +0800 Subject: [PATCH] fix:remove unnecessary error logs (#38245) #38241 Signed-off-by: luzhang <luzhang@zilliz.com> Co-authored-by: luzhang <luzhang@zilliz.com> --- internal/datacoord/task_index.go | 2 +- internal/datacoord/util.go | 2 +- internal/util/vecindexmgr/vector_index_mgr.go | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/datacoord/task_index.go b/internal/datacoord/task_index.go index b4fbe36b51..d082d88eac 100644 --- a/internal/datacoord/task_index.go +++ b/internal/datacoord/task_index.go @@ -211,7 +211,7 @@ func (it *indexBuildTask) PreCheck(ctx context.Context, dependency *taskSchedule optionalFields := make([]*indexpb.OptionalFieldInfo, 0) partitionKeyIsolation := false isVectorTypeSupported := typeutil.IsDenseFloatVectorType(field.DataType) || typeutil.IsBinaryVectorType(field.DataType) - if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isOptionalScalarFieldSupported(indexType) && isVectorTypeSupported { + if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isVectorTypeSupported && isMvSupported(indexType) { if collectionInfo == nil { log.Ctx(ctx).Warn("get collection failed", zap.Int64("collID", segIndex.CollectionID), zap.Error(err)) it.SetState(indexpb.JobState_JobStateInit, err.Error()) diff --git a/internal/datacoord/util.go b/internal/datacoord/util.go index dae4901ec5..19b4fa2f68 100644 --- a/internal/datacoord/util.go +++ b/internal/datacoord/util.go @@ -207,7 +207,7 @@ func isNoTrainIndex(indexType string) bool { return vecindexmgr.GetVecIndexMgrInstance().IsNoTrainIndex(indexType) } -func isOptionalScalarFieldSupported(indexType string) bool { +func isMvSupported(indexType string) bool { return vecindexmgr.GetVecIndexMgrInstance().IsMvSupported(indexType) } diff --git a/internal/util/vecindexmgr/vector_index_mgr.go b/internal/util/vecindexmgr/vector_index_mgr.go index 83444c1a57..8b3a766955 100644 --- a/internal/util/vecindexmgr/vector_index_mgr.go +++ b/internal/util/vecindexmgr/vector_index_mgr.go @@ -87,7 +87,6 @@ type vecIndexMgrImpl struct { func (mgr *vecIndexMgrImpl) GetFeature(indexType IndexType) (uint64, bool) { feature, ok := mgr.features[indexType] if !ok { - log.Error("can not find index " + indexType + " in the index feature map") return 0, false } return feature, true