diff --git a/internal/indexcoord/meta_table.go b/internal/indexcoord/meta_table.go index 7637bc755d..5222540f28 100644 --- a/internal/indexcoord/meta_table.go +++ b/internal/indexcoord/meta_table.go @@ -435,10 +435,6 @@ func (mt *metaTable) IsExpire(buildID UniqueID) bool { } func (mt *metaTable) checkParams(fieldIndex *model.Index, req *indexpb.CreateIndexRequest) bool { - if fieldIndex.IsDeleted { - return false - } - if fieldIndex.IndexName != req.IndexName { return false } @@ -491,6 +487,9 @@ func (mt *metaTable) HasSameReq(req *indexpb.CreateIndexRequest) (bool, UniqueID defer mt.indexLock.RUnlock() for _, fieldIndex := range mt.collectionIndexes[req.CollectionID] { + if fieldIndex.IsDeleted { + continue + } if !mt.checkParams(fieldIndex, req) { continue } diff --git a/internal/metastore/model/index.go b/internal/metastore/model/index.go index 0225d456d4..8b4674e466 100644 --- a/internal/metastore/model/index.go +++ b/internal/metastore/model/index.go @@ -30,7 +30,7 @@ func UnmarshalIndexModel(indexInfo *indexpb.FieldIndex) *Index { IndexName: indexInfo.IndexInfo.GetIndexName(), IsDeleted: indexInfo.GetDeleted(), CreateTime: indexInfo.CreateTime, - TypeParams: nil, + TypeParams: indexInfo.IndexInfo.GetTypeParams(), IndexParams: indexInfo.IndexInfo.GetIndexParams(), } } @@ -106,6 +106,7 @@ func MarshalIndexModel(index *Index) *indexpb.FieldIndex { func CloneIndex(index *Index) *Index { clonedIndex := &Index{ + TenantID: index.TenantID, CollectionID: index.CollectionID, FieldID: index.FieldID, IndexID: index.IndexID,