mirror of https://github.com/milvus-io/milvus.git
show index info while GetSegmentInfo (#26981)
according to QueryNode::GetSegmentInfo Signed-off-by: PowderLi <min.li@zilliz.com>pull/26142/head
parent
394c898b4c
commit
c033580af4
|
@ -19,6 +19,8 @@ package utils
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/milvus-io/milvus/pkg/util/paramtable"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
||||
|
@ -47,6 +49,7 @@ func MergeMetaSegmentIntoSegmentInfo(info *querypb.SegmentInfo, segments ...*met
|
|||
first := segments[0]
|
||||
if info.GetSegmentID() == 0 {
|
||||
*info = querypb.SegmentInfo{
|
||||
NodeID: paramtable.GetNodeID(),
|
||||
SegmentID: first.GetID(),
|
||||
CollectionID: first.GetCollectionID(),
|
||||
PartitionID: first.GetPartitionID(),
|
||||
|
@ -54,6 +57,12 @@ func MergeMetaSegmentIntoSegmentInfo(info *querypb.SegmentInfo, segments ...*met
|
|||
DmChannel: first.GetInsertChannel(),
|
||||
NodeIds: make([]int64, 0),
|
||||
SegmentState: commonpb.SegmentState_Sealed,
|
||||
IndexInfos: make([]*querypb.FieldIndexInfo, 0),
|
||||
}
|
||||
for _, indexInfo := range first.IndexInfo {
|
||||
info.IndexName = indexInfo.IndexName
|
||||
info.IndexID = indexInfo.IndexID
|
||||
info.IndexInfos = append(info.IndexInfos, indexInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue