Release collection and partitions

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
bigsheeper 2021-02-24 17:24:51 +08:00 committed by yefu.chen
parent 0679954922
commit 08a020798e
13 changed files with 271 additions and 168 deletions

View File

@ -93,6 +93,14 @@ func (c *Client) LoadSegments(in *querypb.LoadSegmentRequest) (*commonpb.Status,
return c.grpcClient.LoadSegments(context.TODO(), in)
}
func (c *Client) ReleaseCollection(in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseCollection(context.TODO(), in)
}
func (c *Client) ReleasePartitions(in *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleasePartitions(context.TODO(), in)
}
func (c *Client) ReleaseSegments(in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseSegments(context.TODO(), in)
}

View File

@ -317,6 +317,16 @@ func (s *Server) LoadSegments(ctx context.Context, in *querypb.LoadSegmentReques
return s.impl.LoadSegments(in)
}
func (s *Server) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleaseCollection(in)
}
func (s *Server) ReleasePartitions(ctx context.Context, in *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleasePartitions(in)
}
func (s *Server) ReleaseSegments(ctx context.Context, in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error) {
// ignore ctx
return s.impl.ReleaseSegments(in)

View File

@ -165,9 +165,9 @@ func (index *CIndex) Load(blobs []*Blob) error {
binarySet.Datas = append(binarySet.Datas, &indexcgopb.Binary{Key: blob.Key, Value: blob.Value})
}
datas, err := proto.Marshal(binarySet)
if err != nil {
return err
datas, err2 := proto.Marshal(binarySet)
if err2 != nil {
return err2
}
/*

View File

@ -193,6 +193,8 @@ service QueryNode {
rpc RemoveQueryChannel(RemoveQueryChannelsRequest) returns (common.Status) {}
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
rpc LoadSegments(LoadSegmentRequest) returns (common.Status) {}
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
rpc ReleasePartitions(ReleasePartitionRequest) returns (common.Status) {}
rpc ReleaseSegments(ReleaseSegmentRequest) returns (common.Status) {}
rpc GetSegmentInfo(SegmentInfoRequest) returns (SegmentInfoResponse) {}
}

View File

@ -1420,93 +1420,94 @@ func init() {
func init() { proto.RegisterFile("query_service.proto", fileDescriptor_5fcb6756dc1afb8d) }
var fileDescriptor_5fcb6756dc1afb8d = []byte{
// 1375 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xdd, 0x6e, 0x1b, 0xc5,
0x17, 0xcf, 0xc6, 0x8e, 0x13, 0x9f, 0xb8, 0xb6, 0x3b, 0xf9, 0xf2, 0x7f, 0xff, 0xa5, 0x94, 0x81,
0xb6, 0x69, 0x0b, 0x0e, 0x4a, 0x05, 0xe2, 0x06, 0x50, 0x1b, 0x57, 0x95, 0x11, 0x0d, 0x61, 0xdd,
0xaa, 0x22, 0x50, 0x99, 0xf5, 0xee, 0x24, 0x9e, 0xd6, 0xbb, 0xeb, 0xee, 0x8c, 0xfb, 0x91, 0x1b,
0x40, 0xe2, 0x12, 0xc1, 0x33, 0x20, 0x24, 0x90, 0x78, 0x0a, 0x9e, 0x82, 0x1b, 0x6e, 0x40, 0x5c,
0xf0, 0x1a, 0x68, 0x67, 0xc7, 0x9b, 0xdd, 0xf5, 0x38, 0xeb, 0xc6, 0x6d, 0xc3, 0xdd, 0xce, 0xd9,
0x73, 0xce, 0xef, 0x7c, 0xcd, 0x99, 0x73, 0x60, 0xe9, 0xe1, 0x80, 0xf8, 0x4f, 0xdb, 0x8c, 0xf8,
0x8f, 0xa8, 0x45, 0xea, 0x7d, 0xdf, 0xe3, 0x1e, 0x42, 0x0e, 0xed, 0x3d, 0x1a, 0xb0, 0xf0, 0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22, 0x73, 0xfe,
0x3c, 0xd3, 0xdd, 0x7e, 0xe6, 0xe8, 0x2b, 0xd3, 0x3b, 0x66, 0xd4, 0xc1, 0x33, 0xe8, 0x1e, 0x54,
0x52, 0x5b, 0x94, 0xba, 0x09, 0x8d, 0x59, 0xb5, 0xb2, 0xae, 0xb1, 0x05, 0x68, 0x74, 0xfd, 0x41,
0x75, 0x75, 0xa7, 0x18, 0xb7, 0x26, 0x65, 0x81, 0x7c, 0x01, 0x95, 0xd4, 0x1a, 0xa2, 0xbe, 0x10,
0xea, 0x5d, 0x25, 0x4b, 0xfb, 0x1d, 0x28, 0xc5, 0xf6, 0x0e, 0xa6, 0x2e, 0xd1, 0xd1, 0xcd, 0x24,
0x4b, 0xed, 0xe7, 0x50, 0x49, 0x0e, 0xd9, 0x63, 0xde, 0x4b, 0xe5, 0x24, 0x9e, 0x1d, 0xf6, 0x17,
0x7f, 0xb1, 0xae, 0x5f, 0xdb, 0xfd, 0x70, 0x9f, 0xf2, 0xee, 0xa0, 0x13, 0xc0, 0x6f, 0x1c, 0xd0,
0x5e, 0x8f, 0x1e, 0x70, 0x62, 0x75, 0x37, 0x42, 0x0d, 0x6f, 0xd9, 0x94, 0x71, 0x9f, 0x76, 0x06,
0x9c, 0xd8, 0x1b, 0xc3, 0x26, 0xb0, 0x21, 0xd4, 0x6e, 0x08, 0xb5, 0xfd, 0x4e, 0xa7, 0x20, 0x8e,
0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x72, 0x8c, 0x04, 0x63, 0x18, 0x00, 0x00,
// 1379 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x5d, 0x6f, 0x1b, 0x45,
0x17, 0xce, 0xc6, 0x8e, 0x13, 0x9f, 0xb8, 0xb6, 0x3b, 0xf9, 0xf2, 0xbb, 0x6f, 0x29, 0x65, 0xa0,
0x6d, 0xda, 0x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da, 0xed, 0xd2, 0x7d, 0x4e, 0xac, 0xce, 0x46, 0x68, 0xe1, 0x2d, 0x9b, 0x32,
0xee, 0xd3, 0x56, 0x9f, 0x13, 0x7b, 0x63, 0xc0, 0x63, 0x1b, 0xc2, 0xec, 0x86, 0x30, 0xdb, 0x6b,
0xb5, 0x72, 0xe2, 0x78, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xe5, 0x98, 0xdb, 0x26,
0x19, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2032,6 +2033,8 @@ type QueryNodeClient interface {
RemoveQueryChannel(ctx context.Context, in *RemoveQueryChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
WatchDmChannels(ctx context.Context, in *WatchDmChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
LoadSegments(ctx context.Context, in *LoadSegmentRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
ReleaseCollection(ctx context.Context, in *ReleaseCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
ReleasePartitions(ctx context.Context, in *ReleasePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
ReleaseSegments(ctx context.Context, in *ReleaseSegmentRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
GetSegmentInfo(ctx context.Context, in *SegmentInfoRequest, opts ...grpc.CallOption) (*SegmentInfoResponse, error)
}
@ -2107,6 +2110,24 @@ func (c *queryNodeClient) LoadSegments(ctx context.Context, in *LoadSegmentReque
return out, nil
}
func (c *queryNodeClient) ReleaseCollection(ctx context.Context, in *ReleaseCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/ReleaseCollection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryNodeClient) ReleasePartitions(ctx context.Context, in *ReleasePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/ReleasePartitions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryNodeClient) ReleaseSegments(ctx context.Context, in *ReleaseSegmentRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/ReleaseSegments", in, out, opts...)
@ -2134,6 +2155,8 @@ type QueryNodeServer interface {
RemoveQueryChannel(context.Context, *RemoveQueryChannelsRequest) (*commonpb.Status, error)
WatchDmChannels(context.Context, *WatchDmChannelsRequest) (*commonpb.Status, error)
LoadSegments(context.Context, *LoadSegmentRequest) (*commonpb.Status, error)
ReleaseCollection(context.Context, *ReleaseCollectionRequest) (*commonpb.Status, error)
ReleasePartitions(context.Context, *ReleasePartitionRequest) (*commonpb.Status, error)
ReleaseSegments(context.Context, *ReleaseSegmentRequest) (*commonpb.Status, error)
GetSegmentInfo(context.Context, *SegmentInfoRequest) (*SegmentInfoResponse, error)
}
@ -2163,6 +2186,12 @@ func (*UnimplementedQueryNodeServer) WatchDmChannels(ctx context.Context, req *W
func (*UnimplementedQueryNodeServer) LoadSegments(ctx context.Context, req *LoadSegmentRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoadSegments not implemented")
}
func (*UnimplementedQueryNodeServer) ReleaseCollection(ctx context.Context, req *ReleaseCollectionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReleaseCollection not implemented")
}
func (*UnimplementedQueryNodeServer) ReleasePartitions(ctx context.Context, req *ReleasePartitionRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReleasePartitions not implemented")
}
func (*UnimplementedQueryNodeServer) ReleaseSegments(ctx context.Context, req *ReleaseSegmentRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReleaseSegments not implemented")
}
@ -2300,6 +2329,42 @@ func _QueryNode_LoadSegments_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _QueryNode_ReleaseCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReleaseCollectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).ReleaseCollection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/ReleaseCollection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).ReleaseCollection(ctx, req.(*ReleaseCollectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _QueryNode_ReleasePartitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReleasePartitionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).ReleasePartitions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/ReleasePartitions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).ReleasePartitions(ctx, req.(*ReleasePartitionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _QueryNode_ReleaseSegments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReleaseSegmentRequest)
if err := dec(in); err != nil {
@ -2368,6 +2433,14 @@ var _QueryNode_serviceDesc = grpc.ServiceDesc{
MethodName: "LoadSegments",
Handler: _QueryNode_LoadSegments_Handler,
},
{
MethodName: "ReleaseCollection",
Handler: _QueryNode_ReleaseCollection_Handler,
},
{
MethodName: "ReleasePartitions",
Handler: _QueryNode_ReleasePartitions_Handler,
},
{
MethodName: "ReleaseSegments",
Handler: _QueryNode_ReleaseSegments_Handler,

View File

@ -555,7 +555,7 @@ func (st *SearchTask) PreExecute(ctx context.Context) error {
for _, partitionName := range st.query.PartitionNames {
partitionID, err := globalMetaCache.GetPartitionID(collectionName, partitionName)
if err != nil {
return err
continue
}
st.PartitionIDs = append(st.PartitionIDs, partitionID)
}

View File

@ -12,6 +12,7 @@ package querynode
*/
import "C"
import (
"fmt"
"strconv"
"sync"
@ -114,15 +115,15 @@ func (colReplica *collectionReplicaImpl) removeCollectionPrivate(collectionID Un
return err
}
deleteCollection(collection)
delete(colReplica.collections, collectionID)
// delete partitions
for _, partitionID := range collection.partitionIDs {
// ignore error, try to delete
_ = colReplica.removePartitionPrivate(partitionID)
}
deleteCollection(collection)
delete(colReplica.collections, collectionID)
return nil
}
@ -262,14 +263,15 @@ func (colReplica *collectionReplicaImpl) removePartitionPrivate(partitionID Uniq
return err
}
collection.removePartitionID(partitionID)
delete(colReplica.partitions, partitionID)
// delete segments
for _, segmentID := range partition.segmentIDs {
// try to delete, ignore error
_ = colReplica.removeSegmentPrivate(segmentID)
}
collection.removePartitionID(partitionID)
delete(colReplica.partitions, partitionID)
return nil
}
@ -390,6 +392,7 @@ func (colReplica *collectionReplicaImpl) removeSegment(segmentID UniqueID) error
}
func (colReplica *collectionReplicaImpl) removeSegmentPrivate(segmentID UniqueID) error {
fmt.Println("remove segment", segmentID)
segment, err := colReplica.getSegmentByIDPrivate(segmentID)
if err != nil {
return err

View File

@ -20,7 +20,7 @@ func (ddNode *ddNode) Name() string {
}
func (ddNode *ddNode) Operate(in []*Msg) []*Msg {
//fmt.Println("Do filterDmNode operation")
//fmt.Println("Do ddNode operation")
if len(in) != 1 {
log.Println("Invalid operate message input in ddNode, input length = ", len(in))

View File

@ -11,6 +11,7 @@ package querynode
*/
import "C"
import "fmt"
type Partition struct {
collectionID UniqueID
@ -44,5 +45,6 @@ func newPartition(collectionID UniqueID, partitionID UniqueID) *Partition {
enable: false,
}
fmt.Println("create partition", partitionID)
return newPartition
}

View File

@ -38,6 +38,8 @@ type Node interface {
RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest) (*commonpb.Status, error)
WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*commonpb.Status, error)
LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.Status, error)
ReleaseCollection(in *queryPb.ReleaseCollectionRequest) (*commonpb.Status, error)
ReleasePartitions(in *queryPb.ReleasePartitionRequest) (*commonpb.Status, error)
ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error)
GetSegmentInfo(in *queryPb.SegmentInfoRequest) (*queryPb.SegmentInfoResponse, error)
}
@ -479,34 +481,51 @@ func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.S
}, nil
}
func (node *QueryNode) ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error) {
for _, id := range in.PartitionIDs {
err := node.replica.enablePartition(id)
if err != nil {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
}
return status, err
func (node *QueryNode) ReleaseCollection(in *queryPb.ReleaseCollectionRequest) (*commonpb.Status, error) {
err := node.replica.removeCollection(in.CollectionID)
if err != nil {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
}
return status, err
}
// release all fields in the segments
for _, id := range in.SegmentIDs {
err := node.loadService.segLoader.releaseSegment(id)
if err != nil {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
}
return status, err
}
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
}, nil
}
func (node *QueryNode) ReleasePartitions(in *queryPb.ReleasePartitionRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
}
for _, id := range in.PartitionIDs {
err := node.loadService.segLoader.replica.removePartition(id)
if err != nil {
// not return, try to release all partitions
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.Reason = err.Error()
}
}
return status, nil
}
func (node *QueryNode) ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error) {
status := &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
}
for _, id := range in.SegmentIDs {
err2 := node.loadService.segLoader.replica.removeSegment(id)
if err2 != nil {
// not return, try to release all segments
status.ErrorCode = commonpb.ErrorCode_UNEXPECTED_ERROR
status.Reason = err2.Error()
}
}
return status, nil
}
func (node *QueryNode) GetSegmentInfo(in *queryPb.SegmentInfoRequest) (*queryPb.SegmentInfoResponse, error) {
infos := make([]*queryPb.SegmentInfo, 0)
for _, id := range in.SegmentIDs {

View File

@ -28,11 +28,6 @@ type segmentLoader struct {
indexLoader *indexLoader
}
func (loader *segmentLoader) releaseSegment(segmentID UniqueID) error {
err := loader.replica.removeSegment(segmentID)
return err
}
func (loader *segmentLoader) seekSegment(position *internalpb2.MsgPosition) error {
// TODO: open seek
//for _, position := range positions {

View File

@ -36,6 +36,14 @@ func (qn *queryNodeInfo) AddQueryChannel(in *querypb.AddQueryChannelsRequest) (*
return qn.client.AddQueryChannel(in)
}
func (qn *queryNodeInfo) ReleaseCollection(in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
return qn.client.ReleaseCollection(in)
}
func (qn *queryNodeInfo) ReleasePartitions(in *querypb.ReleasePartitionRequest) (*commonpb.Status, error) {
return qn.client.ReleasePartitions(in)
}
func newQueryNodeInfo(client QueryNodeInterface) *queryNodeInfo {
segments := make([]UniqueID, 0)
dmChannelNames := make([]string, 0)

View File

@ -40,6 +40,8 @@ type QueryNodeInterface interface {
RemoveQueryChannel(in *querypb.RemoveQueryChannelsRequest) (*commonpb.Status, error)
WatchDmChannels(in *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
LoadSegments(in *querypb.LoadSegmentRequest) (*commonpb.Status, error)
ReleaseCollection(req *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)
ReleasePartitions(req *querypb.ReleasePartitionRequest) (*commonpb.Status, error)
ReleaseSegments(in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error)
GetSegmentInfo(req *querypb.SegmentInfoRequest) (*querypb.SegmentInfoResponse, error)
}
@ -278,7 +280,7 @@ func (qs *QueryService) ReleaseCollection(req *querypb.ReleaseCollectionRequest)
dbID := req.DbID
collectionID := req.CollectionID
fmt.Println("release collection start, collectionID = ", collectionID)
partitions, err := qs.replica.getPartitions(dbID, collectionID)
_, err := qs.replica.getCollectionByID(dbID, collectionID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
@ -286,20 +288,13 @@ func (qs *QueryService) ReleaseCollection(req *querypb.ReleaseCollectionRequest)
}, err
}
partitionIDs := make([]UniqueID, 0)
for _, partition := range partitions {
partitionIDs = append(partitionIDs, partition.id)
for _, node := range qs.queryNodes {
status, err := node.ReleaseCollection(req)
if err != nil {
return status, err
}
}
releasePartitionRequest := &querypb.ReleasePartitionRequest{
Base: req.Base,
DbID: dbID,
CollectionID: collectionID,
PartitionIDs: partitionIDs,
}
status, err := qs.ReleasePartitions(releasePartitionRequest)
err = qs.replica.releaseCollection(dbID, collectionID)
if err != nil {
return &commonpb.Status{
@ -310,7 +305,9 @@ func (qs *QueryService) ReleaseCollection(req *querypb.ReleaseCollectionRequest)
fmt.Println("release collection end")
//TODO:: queryNode cancel subscribe dmChannels
return status, err
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
}, nil
}
func (qs *QueryService) ShowPartitions(req *querypb.ShowPartitionRequest) (*querypb.ShowPartitionResponse, error) {
@ -475,48 +472,34 @@ func (qs *QueryService) ReleasePartitions(req *querypb.ReleasePartitionRequest)
dbID := req.DbID
collectionID := req.CollectionID
partitionIDs := req.PartitionIDs
segmentIDs := make([]UniqueID, 0)
fmt.Println("start release partitions start, partitionIDs = ", partitionIDs)
toReleasedPartitionID := make([]UniqueID, 0)
for _, partitionID := range partitionIDs {
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
_, err := qs.replica.getPartitionByID(dbID, collectionID, partitionID)
if err == nil {
toReleasedPartitionID = append(toReleasedPartitionID, partitionID)
}
}
segmentIDs = append(segmentIDs, showSegmentResponse.SegmentIDs...)
err = qs.replica.releasePartition(dbID, collectionID, partitionID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
}, err
}
}
releaseSegmentRequest := &querypb.ReleaseSegmentRequest{
Base: req.Base,
DbID: dbID,
CollectionID: collectionID,
PartitionIDs: partitionIDs,
SegmentIDs: segmentIDs,
}
req.PartitionIDs = toReleasedPartitionID
for _, node := range qs.queryNodes {
status, err := node.client.ReleaseSegments(releaseSegmentRequest)
status, err := node.client.ReleasePartitions(req)
if err != nil {
return status, err
}
}
for _, partitionID := range toReleasedPartitionID {
err := qs.replica.releasePartition(dbID, collectionID, partitionID)
if err != nil {
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
Reason: err.Error(),
}, err
}
}
fmt.Println("start release partitions end")
//TODO:: queryNode cancel subscribe dmChannels
return &commonpb.Status{