diff --git a/internal/proxy/task.go b/internal/proxy/task.go index c9c5b9770c..c92410eb1d 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -1991,11 +1991,6 @@ func (dit *describeIndexTask) PreExecute(ctx context.Context) error { return err } - // only support default index name for now. @2021.02.18 - if dit.IndexName == "" { - dit.IndexName = Params.CommonCfg.DefaultIndexName - } - collID, _ := globalMetaCache.GetCollectionID(ctx, dit.CollectionName) dit.collectionID = collID return nil diff --git a/internal/rootcoord/meta_table.go b/internal/rootcoord/meta_table.go index 868625f9d3..3241c52c71 100644 --- a/internal/rootcoord/meta_table.go +++ b/internal/rootcoord/meta_table.go @@ -785,13 +785,15 @@ func (mt *MetaTable) AddIndex(segIdxInfo *pb.SegmentIndexInfo) error { return fmt.Errorf("index id = %d not found", segIdxInfo.IndexID) } + if _, ok := mt.partID2SegID[segIdxInfo.PartitionID]; !ok { + segIDMap := map[typeutil.UniqueID]bool{segIdxInfo.SegmentID: true} + mt.partID2SegID[segIdxInfo.PartitionID] = segIDMap + } + segIdxMap, ok := mt.segID2IndexMeta[segIdxInfo.SegmentID] if !ok { idxMap := map[typeutil.UniqueID]pb.SegmentIndexInfo{segIdxInfo.IndexID: *segIdxInfo} mt.segID2IndexMeta[segIdxInfo.SegmentID] = idxMap - - segIDMap := map[typeutil.UniqueID]bool{segIdxInfo.SegmentID: true} - mt.partID2SegID[segIdxInfo.PartitionID] = segIDMap } else { tmpInfo, ok := segIdxMap[segIdxInfo.IndexID] if ok { @@ -884,8 +886,8 @@ func (mt *MetaTable) DropIndex(collName, fieldName, indexName string) (typeutil. delete(mt.indexID2Meta, dropIdxID) // update segID2IndexMeta - for partID := range collMeta.PartitionIDs { - if segIDMap, ok := mt.partID2SegID[typeutil.UniqueID(partID)]; ok { + for _, partID := range collMeta.PartitionIDs { + if segIDMap, ok := mt.partID2SegID[partID]; ok { for segID := range segIDMap { if segIndexInfos, ok := mt.segID2IndexMeta[segID]; ok { delete(segIndexInfos, dropIdxID) @@ -1086,7 +1088,8 @@ func (mt *MetaTable) GetNotIndexedSegments(collName string, fieldName string, id return nil, schemapb.FieldSchema{}, fmt.Errorf("metaTable GetNotIndexedSegments Marshal collMeta fail key:%s, err:%w", k1, err) } - k2 := path.Join(IndexMetaPrefix, strconv.FormatInt(idx.IndexID, 10)) + k2 := fmt.Sprintf("%s/%d/%d", IndexMetaPrefix, collID, idx.IndexID) + //k2 := path.Join(IndexMetaPrefix, strconv.FormatInt(idx.IndexID, 10)) v2, err := proto.Marshal(idxInfo) if err != nil { log.Error("MetaTable GetNotIndexedSegments Marshal idxInfo fail", diff --git a/tests/python_client/requirements.txt b/tests/python_client/requirements.txt index 88d8c5cb34..9f476540f4 100644 --- a/tests/python_client/requirements.txt +++ b/tests/python_client/requirements.txt @@ -9,7 +9,7 @@ allure-pytest==2.7.0 pytest-print==0.2.1 pytest-level==0.1.1 pytest-xdist==2.2.1 -pymilvus==2.1.0.dev47 +pymilvus==2.1.0.dev50 pytest-rerunfailures==9.1.1 git+https://github.com/Projectplace/pytest-tags ndg-httpsclient