Implement distributed api, delete partition states api

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/4973/head^2
bigsheeper 2021-01-22 11:17:18 +08:00 committed by yefu.chen
parent ef79b8d8c7
commit 46a0a6133a
7 changed files with 262 additions and 159 deletions

View File

@ -13,28 +13,28 @@ type Client struct {
grpcClient querypb.QueryNodeClient
}
func (c *Client) Init() error {
panic("implement me")
}
func (c *Client) Start() error {
panic("implement me")
}
func (c *Client) Stop() error {
panic("implement me")
}
func (c *Client) GetComponentStates() (*internalpb2.ComponentStates, error) {
panic("implement me")
states, err := c.grpcClient.GetComponentStates(context.TODO(), nil)
if err != nil {
return nil, err
}
return states.ServerStates, nil
}
func (c *Client) GetTimeTickChannel() (string, error) {
panic("implement me")
response, err := c.grpcClient.GetTimeTickChannel(context.TODO(), nil)
if err != nil {
return "", err
}
return response.TimeTickChannelID, nil
}
func (c *Client) GetStatisticsChannel() (string, error) {
panic("implement me")
response, err := c.grpcClient.GetStatsChannel(context.TODO(), nil)
if err != nil {
return "", err
}
return response.StatsChannelID, nil
}
func (c *Client) AddQueryChannel(in *querypb.AddQueryChannelsRequest) (*commonpb.Status, error) {
@ -56,7 +56,3 @@ func (c *Client) LoadSegments(in *querypb.LoadSegmentRequest) (*commonpb.Status,
func (c *Client) ReleaseSegments(in *querypb.ReleaseSegmentRequest) (*commonpb.Status, error) {
return c.grpcClient.ReleaseSegments(context.TODO(), in)
}
func (c *Client) GetPartitionState(in *querypb.PartitionStatesRequest) (*querypb.PartitionStatesResponse, error) {
return c.grpcClient.GetPartitionState(context.TODO(), in)
}

View File

@ -13,7 +13,7 @@ import (
type Server struct {
grpcServer *grpc.Server
node querynode.Node
node *querynode.QueryNode
}
func NewServer(ctx context.Context, queryNodeID uint64) *Server {
@ -36,9 +36,59 @@ func (s *Server) StartGrpcServer() {
}
}
func (s *Server) Start() {
func (s *Server) Init() error {
return s.Init()
}
func (s *Server) Start() error {
go s.StartGrpcServer()
s.node.Start()
return s.node.Start()
}
func (s *Server) Stop() error {
return s.Stop()
}
func (s *Server) GetTimeTickChannel(ctx context.Context, in *commonpb.Empty) (*querypb.GetTimeTickChannelResponse, error) {
// ignore ctx and in
channel, err := s.node.GetTimeTickChannel()
if err != nil {
return nil, err
}
return &querypb.GetTimeTickChannelResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
TimeTickChannelID: channel,
}, nil
}
func (s *Server) GetStatsChannel(ctx context.Context, in *commonpb.Empty) (*querypb.GetStatsChannelResponse, error) {
// ignore ctx and in
channel, err := s.node.GetStatisticsChannel()
if err != nil {
return nil, err
}
return &querypb.GetStatsChannelResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
StatsChannelID: channel,
}, nil
}
func (s *Server) GetComponentStates(ctx context.Context, in *commonpb.Empty) (*querypb.ServiceStatesResponse, error) {
// ignore ctx and in
componentStates, err := s.node.GetComponentStates()
if err != nil {
return nil, err
}
return &querypb.ServiceStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
},
ServerStates: componentStates,
}, nil
}
func (s *Server) AddQueryChannel(ctx context.Context, in *querypb.AddQueryChannelsRequest) (*commonpb.Status, error) {
@ -65,8 +115,3 @@ func (s *Server) ReleaseSegments(ctx context.Context, in *querypb.ReleaseSegment
// ignore ctx
return s.node.ReleaseSegments(in)
}
func (s *Server) GetPartitionState(ctx context.Context, in *querypb.PartitionStatesRequest) (*querypb.PartitionStatesResponse, error) {
// ignore ctx
return s.node.GetPartitionState(in)
}

View File

@ -167,10 +167,13 @@ service QueryService {
}
service QueryNode {
rpc GetTimeTickChannel(common.Empty) returns (GetTimeTickChannelResponse) {}
rpc GetStatsChannel(common.Empty) returns (GetStatsChannelResponse) {}
rpc GetComponentStates(common.Empty) returns (ServiceStatesResponse) {}
rpc AddQueryChannel(AddQueryChannelsRequest) returns (common.Status) {}
rpc RemoveQueryChannel(RemoveQueryChannelsRequest) returns (common.Status) {}
rpc WatchDmChannels(WatchDmChannelsRequest) returns (common.Status) {}
rpc LoadSegments(LoadSegmentRequest) returns (common.Status) {}
rpc ReleaseSegments(ReleaseSegmentRequest) returns (common.Status) {}
rpc GetPartitionState(PartitionStatesRequest) returns (PartitionStatesResponse) {}
}

View File

@ -1297,81 +1297,81 @@ func init() {
func init() { proto.RegisterFile("query_service.proto", fileDescriptor_5fcb6756dc1afb8d) }
var fileDescriptor_5fcb6756dc1afb8d = []byte{
// 1174 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x5b, 0x6f, 0x1b, 0x45,
0x14, 0xf6, 0xc6, 0x4e, 0xa8, 0x4f, 0x1c, 0xdb, 0x99, 0x5c, 0xb5, 0xa0, 0xaa, 0x0c, 0xd0, 0xe6,
0x02, 0x0e, 0x4a, 0x25, 0xc4, 0x1b, 0x4a, 0xe2, 0x2a, 0xb2, 0xa0, 0x21, 0x6c, 0x5a, 0x21, 0x42,
0x23, 0xb3, 0xde, 0x1d, 0x92, 0x69, 0xf7, 0xe2, 0xee, 0x8c, 0x53, 0x92, 0x17, 0xa8, 0xc4, 0x3b,
0xcf, 0x3c, 0x22, 0x10, 0x48, 0xfc, 0x02, 0xfe, 0x06, 0xcf, 0xf0, 0xc2, 0x3f, 0x41, 0x3b, 0xb3,
0xde, 0xec, 0xae, 0xc7, 0x97, 0xd4, 0x69, 0xd3, 0xb7, 0x9d, 0xd9, 0x33, 0xe7, 0xfb, 0xce, 0x99,
0x39, 0x67, 0xbe, 0x81, 0xb9, 0xa7, 0x1d, 0x12, 0x9c, 0x35, 0x19, 0x09, 0x4e, 0xa9, 0x45, 0x6a,
0xed, 0xc0, 0xe7, 0x3e, 0x42, 0x2e, 0x75, 0x4e, 0x3b, 0x4c, 0x8e, 0x6a, 0xc2, 0x42, 0x2f, 0x59,
0xbe, 0xeb, 0xfa, 0x9e, 0x9c, 0xd3, 0xcb, 0xd4, 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0x3e, 0xc5, 0xfd, 0x04, 0xe7, 0x30, 0x90, 0x47, 0x50, 0xc9, 0x08, 0x3a, 0xf5, 0xf6,
0xa8, 0x55, 0xdf, 0x30, 0xef, 0x0f, 0xa1, 0x94, 0x50, 0x70, 0x0c, 0xdd, 0xee, 0x57, 0xe1, 0x69,
0x05, 0x34, 0xcc, 0xed, 0xd7, 0x50, 0x49, 0x2b, 0xa7, 0x3e, 0xbd, 0x5c, 0x29, 0xaf, 0x86, 0x39,
0xf7, 0x60, 0xb6, 0xe7, 0xcc, 0xbe, 0xc4, 0x23, 0xbb, 0xbd, 0x75, 0xf8, 0xc9, 0x31, 0xe5, 0x27,
0x9d, 0x56, 0xc8, 0x64, 0xe3, 0x9c, 0x3a, 0x0e, 0x3d, 0xe7, 0xc4, 0x3a, 0xd9, 0x90, 0x5e, 0x3e,
0xb0, 0x29, 0xe3, 0x01, 0x6d, 0x75, 0x38, 0xb1, 0x37, 0xba, 0xb7, 0xfb, 0x86, 0x70, 0xbd, 0x21,
0x5c, 0xb7, 0x5b, 0xad, 0x29, 0x31, 0xbc, 0xfb, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x90, 0x66,
0x45, 0xf8, 0x0a, 0x15, 0x00, 0x00,
// 1172 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xf6, 0xc6, 0x8e, 0xa9, 0x4f, 0x1c, 0xdb, 0x99, 0xfc, 0x6a, 0x41, 0x55, 0x19, 0xa0, 0xcd,
0x0f, 0x38, 0x28, 0x95, 0x10, 0x77, 0x28, 0x89, 0xab, 0xc8, 0x82, 0x86, 0xb0, 0x69, 0x85, 0x08,
0x8d, 0xcc, 0x7a, 0x77, 0x48, 0xa6, 0xdd, 0x1f, 0x77, 0x67, 0x9c, 0x92, 0xdc, 0x40, 0x11, 0xf7,
0x5c, 0x73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, 0x80, 0xb5,
0x01, 0x00, 0xaa, 0xf6, 0x8a, 0x73, 0xc8, 0x17, 0x11, 0x64, 0xdf, 0x5b, 0xab, 0xa3, 0x28, 0xff,
0x68, 0x1b, 0xd6, 0x46, 0xb2, 0x8d, 0x01, 0x0f, 0x05, 0x60, 0xa6, 0xf7, 0x5d, 0x18, 0x91, 0xba,
0xde, 0x54, 0x6d, 0x1b, 0xe7, 0x36, 0xbe, 0x2f, 0x42, 0x49, 0x6c, 0x96, 0xe8, 0x53, 0xff, 0xff,
0xfd, 0x79, 0xb9, 0xe9, 0x42, 0x87, 0x50, 0xcd, 0x08, 0x76, 0x75, 0x07, 0x19, 0xa0, 0xea, 0x87,
0xd5, 0xa0, 0x05, 0xa8, 0x5f, 0x69, 0xa3, 0xba, 0xba, 0xcc, 0x07, 0x29, 0xf2, 0x61, 0x20, 0x8f,
0xa0, 0x9a, 0x51, 0xbc, 0xea, 0xf3, 0xab, 0x96, 0xc5, 0xc3, 0xbc, 0x3f, 0x84, 0x72, 0x42, 0xe2,
0x32, 0x74, 0x7b, 0x50, 0x0b, 0x4c, 0x4b, 0xc4, 0x61, 0x6e, 0xbf, 0x84, 0x6a, 0x5a, 0x5a, 0x0e,
0xb8, 0xec, 0x94, 0xfa, 0x73, 0x88, 0xf3, 0xad, 0xcd, 0x83, 0x8f, 0x8e, 0x28, 0x3f, 0xee, 0xb6,
0xc3, 0x3f, 0xeb, 0x67, 0xd4, 0x71, 0xe8, 0x19, 0x27, 0xd6, 0xf1, 0xba, 0x5c, 0xf5, 0x9e, 0x4d,
0x19, 0x0f, 0x68, 0xbb, 0xcb, 0x89, 0xbd, 0xde, 0x93, 0x23, 0xeb, 0xc2, 0xd5, 0xba, 0x40, 0xed,
0xb4, 0xdb, 0x45, 0x31, 0xbc, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x5d, 0xc7, 0x98,
0xbb, 0x15, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1854,12 +1854,14 @@ var _QueryService_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type QueryNodeClient interface {
GetTimeTickChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*GetTimeTickChannelResponse, error)
GetStatsChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*GetStatsChannelResponse, error)
GetComponentStates(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*ServiceStatesResponse, error)
AddQueryChannel(ctx context.Context, in *AddQueryChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
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)
ReleaseSegments(ctx context.Context, in *ReleaseSegmentRequest, opts ...grpc.CallOption) (*commonpb.Status, error)
GetPartitionState(ctx context.Context, in *PartitionStatesRequest, opts ...grpc.CallOption) (*PartitionStatesResponse, error)
}
type queryNodeClient struct {
@ -1870,6 +1872,33 @@ func NewQueryNodeClient(cc *grpc.ClientConn) QueryNodeClient {
return &queryNodeClient{cc}
}
func (c *queryNodeClient) GetTimeTickChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*GetTimeTickChannelResponse, error) {
out := new(GetTimeTickChannelResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/GetTimeTickChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryNodeClient) GetStatsChannel(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*GetStatsChannelResponse, error) {
out := new(GetStatsChannelResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/GetStatsChannel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryNodeClient) GetComponentStates(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*ServiceStatesResponse, error) {
out := new(ServiceStatesResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/GetComponentStates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryNodeClient) AddQueryChannel(ctx context.Context, in *AddQueryChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
out := new(commonpb.Status)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/AddQueryChannel", in, out, opts...)
@ -1915,29 +1944,31 @@ func (c *queryNodeClient) ReleaseSegments(ctx context.Context, in *ReleaseSegmen
return out, nil
}
func (c *queryNodeClient) GetPartitionState(ctx context.Context, in *PartitionStatesRequest, opts ...grpc.CallOption) (*PartitionStatesResponse, error) {
out := new(PartitionStatesResponse)
err := c.cc.Invoke(ctx, "/milvus.proto.query.QueryNode/GetPartitionState", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryNodeServer is the server API for QueryNode service.
type QueryNodeServer interface {
GetTimeTickChannel(context.Context, *commonpb.Empty) (*GetTimeTickChannelResponse, error)
GetStatsChannel(context.Context, *commonpb.Empty) (*GetStatsChannelResponse, error)
GetComponentStates(context.Context, *commonpb.Empty) (*ServiceStatesResponse, error)
AddQueryChannel(context.Context, *AddQueryChannelsRequest) (*commonpb.Status, error)
RemoveQueryChannel(context.Context, *RemoveQueryChannelsRequest) (*commonpb.Status, error)
WatchDmChannels(context.Context, *WatchDmChannelsRequest) (*commonpb.Status, error)
LoadSegments(context.Context, *LoadSegmentRequest) (*commonpb.Status, error)
ReleaseSegments(context.Context, *ReleaseSegmentRequest) (*commonpb.Status, error)
GetPartitionState(context.Context, *PartitionStatesRequest) (*PartitionStatesResponse, error)
}
// UnimplementedQueryNodeServer can be embedded to have forward compatible implementations.
type UnimplementedQueryNodeServer struct {
}
func (*UnimplementedQueryNodeServer) GetTimeTickChannel(ctx context.Context, req *commonpb.Empty) (*GetTimeTickChannelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimeTickChannel not implemented")
}
func (*UnimplementedQueryNodeServer) GetStatsChannel(ctx context.Context, req *commonpb.Empty) (*GetStatsChannelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStatsChannel not implemented")
}
func (*UnimplementedQueryNodeServer) GetComponentStates(ctx context.Context, req *commonpb.Empty) (*ServiceStatesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComponentStates not implemented")
}
func (*UnimplementedQueryNodeServer) AddQueryChannel(ctx context.Context, req *AddQueryChannelsRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddQueryChannel not implemented")
}
@ -1953,14 +1984,65 @@ func (*UnimplementedQueryNodeServer) LoadSegments(ctx context.Context, req *Load
func (*UnimplementedQueryNodeServer) ReleaseSegments(ctx context.Context, req *ReleaseSegmentRequest) (*commonpb.Status, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReleaseSegments not implemented")
}
func (*UnimplementedQueryNodeServer) GetPartitionState(ctx context.Context, req *PartitionStatesRequest) (*PartitionStatesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPartitionState not implemented")
}
func RegisterQueryNodeServer(s *grpc.Server, srv QueryNodeServer) {
s.RegisterService(&_QueryNode_serviceDesc, srv)
}
func _QueryNode_GetTimeTickChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).GetTimeTickChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/GetTimeTickChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).GetTimeTickChannel(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _QueryNode_GetStatsChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).GetStatsChannel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/GetStatsChannel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).GetStatsChannel(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _QueryNode_GetComponentStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).GetComponentStates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/GetComponentStates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).GetComponentStates(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _QueryNode_AddQueryChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddQueryChannelsRequest)
if err := dec(in); err != nil {
@ -2051,28 +2133,22 @@ func _QueryNode_ReleaseSegments_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _QueryNode_GetPartitionState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PartitionStatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryNodeServer).GetPartitionState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/milvus.proto.query.QueryNode/GetPartitionState",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryNodeServer).GetPartitionState(ctx, req.(*PartitionStatesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _QueryNode_serviceDesc = grpc.ServiceDesc{
ServiceName: "milvus.proto.query.QueryNode",
HandlerType: (*QueryNodeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetTimeTickChannel",
Handler: _QueryNode_GetTimeTickChannel_Handler,
},
{
MethodName: "GetStatsChannel",
Handler: _QueryNode_GetStatsChannel_Handler,
},
{
MethodName: "GetComponentStates",
Handler: _QueryNode_GetComponentStates_Handler,
},
{
MethodName: "AddQueryChannel",
Handler: _QueryNode_AddQueryChannel_Handler,
@ -2093,10 +2169,6 @@ var _QueryNode_serviceDesc = grpc.ServiceDesc{
MethodName: "ReleaseSegments",
Handler: _QueryNode_ReleaseSegments_Handler,
},
{
MethodName: "GetPartitionState",
Handler: _QueryNode_GetPartitionState_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "query_service.proto",

View File

@ -19,10 +19,6 @@ import (
"io"
"sync/atomic"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
queryserviceimpl "github.com/zilliztech/milvus-distributed/internal/queryservice"
"github.com/opentracing/opentracing-go"
"github.com/uber/jaeger-client-go/config"
@ -31,11 +27,11 @@ import (
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
queryPb "github.com/zilliztech/milvus-distributed/internal/proto/querypb"
queryserviceimpl "github.com/zilliztech/milvus-distributed/internal/queryservice"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type Node interface {
typeutil.Service
GetComponentStates() (*internalpb2.ComponentStates, error)
GetTimeTickChannel() (string, error)
GetStatisticsChannel() (string, error)
@ -45,10 +41,11 @@ type Node interface {
WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*commonpb.Status, error)
LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.Status, error)
ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error)
GetPartitionState(in *queryPb.PartitionStatesRequest) (*queryPb.PartitionStatesResponse, error)
}
type QueryNode struct {
typeutil.Service
queryNodeLoopCtx context.Context
queryNodeLoopCancel context.CancelFunc
@ -71,12 +68,7 @@ type QueryNode struct {
closer io.Closer
}
func NewQueryNode(ctx context.Context, queryNodeID uint64) Node {
var node Node = newQueryNode(ctx, queryNodeID)
return node
}
func newQueryNode(ctx context.Context, queryNodeID uint64) *QueryNode {
func NewQueryNode(ctx context.Context, queryNodeID uint64) *QueryNode {
ctx1, cancel := context.WithCancel(ctx)
node := &QueryNode{
queryNodeLoopCtx: ctx1,
@ -385,8 +377,3 @@ func (node *QueryNode) ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*comm
}
return nil, nil
}
func (node *QueryNode) GetPartitionState(in *queryPb.PartitionStatesRequest) (*queryPb.PartitionStatesResponse, error) {
// TODO: implement
return nil, nil
}

View File

@ -130,7 +130,7 @@ func newQueryNodeMock() *QueryNode {
ctx = context.Background()
}
svr := newQueryNode(ctx, 0)
svr := NewQueryNode(ctx, 0)
return svr
}

View File

@ -213,7 +213,7 @@ func TestSearch_Search(t *testing.T) {
}
func TestSearch_SearchMultiSegments(t *testing.T) {
node := newQueryNode(context.Background(), 0)
node := NewQueryNode(context.Background(), 0)
initTestMeta(t, node, "collection0", 0, 0)
pulsarURL := Params.PulsarAddress