mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Change master meta prefix
Signed-off-by: neza2017 <yefu.chen@zilliz.com>
This commit is contained in:
parent
7901d98d5e
commit
c2956dbe92
@ -17,12 +17,13 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
TenantMetaPrefix = "tenant"
|
||||
ProxyMetaPrefix = "proxy"
|
||||
CollectionMetaPrefix = "collection"
|
||||
PartitionMetaPrefix = "partition"
|
||||
SegmentIndexMetaPrefix = "segment-index"
|
||||
IndexMetaPrefix = "index"
|
||||
ComponentPrefix = "master-service"
|
||||
TenantMetaPrefix = ComponentPrefix + "/tenant"
|
||||
ProxyMetaPrefix = ComponentPrefix + "/proxy"
|
||||
CollectionMetaPrefix = ComponentPrefix + "/collection"
|
||||
PartitionMetaPrefix = ComponentPrefix + "/partition"
|
||||
SegmentIndexMetaPrefix = ComponentPrefix + "/segment-index"
|
||||
IndexMetaPrefix = ComponentPrefix + "/index"
|
||||
)
|
||||
|
||||
type metaTable struct {
|
||||
|
||||
@ -449,19 +449,22 @@ func (qs *QueryService) ReleasePartitions(req *querypb.ReleasePartitionRequest)
|
||||
segmentIDs := make([]UniqueID, 0)
|
||||
fmt.Println("start release partitions start, partitionIDs = ", partitionIDs)
|
||||
for _, partitionID := range partitionIDs {
|
||||
segments, err := qs.replica.getSegments(dbID, collectionID, partitionID)
|
||||
showSegmentRequest := &milvuspb.ShowSegmentRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_kShowSegment,
|
||||
},
|
||||
CollectionID: collectionID,
|
||||
PartitionID: partitionID,
|
||||
}
|
||||
showSegmentResponse, err := qs.masterServiceClient.ShowSegments(showSegmentRequest)
|
||||
if err != nil {
|
||||
return &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
|
||||
Reason: err.Error(),
|
||||
}, err
|
||||
}
|
||||
res := make([]UniqueID, 0)
|
||||
for _, segment := range segments {
|
||||
res = append(res, segment.id)
|
||||
}
|
||||
|
||||
segmentIDs = append(segmentIDs, res...)
|
||||
segmentIDs = append(segmentIDs, showSegmentResponse.SegmentIDs...)
|
||||
err = qs.replica.releasePartition(dbID, collectionID, partitionID)
|
||||
if err != nil {
|
||||
return &commonpb.Status{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user