2021-01-22 09:36:18 +08:00
|
|
|
package grpcproxynode
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-02-26 17:44:24 +08:00
|
|
|
"fmt"
|
2021-02-23 09:58:06 +08:00
|
|
|
"io"
|
2021-03-08 15:49:42 +08:00
|
|
|
"math"
|
2021-01-22 09:36:18 +08:00
|
|
|
"net"
|
|
|
|
"strconv"
|
|
|
|
"sync"
|
2021-01-28 20:51:44 +08:00
|
|
|
"time"
|
|
|
|
|
2021-03-10 09:56:09 +08:00
|
|
|
"go.uber.org/zap"
|
2021-02-23 11:40:30 +08:00
|
|
|
"google.golang.org/grpc"
|
|
|
|
|
2021-02-26 17:44:24 +08:00
|
|
|
otgrpc "github.com/opentracing-contrib/go-grpc"
|
2021-02-23 11:40:30 +08:00
|
|
|
grpcdataserviceclient "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice/client"
|
2021-01-29 09:27:26 +08:00
|
|
|
grpcindexserviceclient "github.com/zilliztech/milvus-distributed/internal/distributed/indexservice/client"
|
2021-02-23 11:40:30 +08:00
|
|
|
grpcmasterserviceclient "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice/client"
|
2021-02-23 09:58:06 +08:00
|
|
|
grpcproxyserviceclient "github.com/zilliztech/milvus-distributed/internal/distributed/proxyservice/client"
|
2021-01-29 09:27:26 +08:00
|
|
|
grpcqueryserviceclient "github.com/zilliztech/milvus-distributed/internal/distributed/queryservice/client"
|
2021-02-23 11:40:30 +08:00
|
|
|
|
|
|
|
"github.com/opentracing/opentracing-go"
|
2021-03-10 09:56:09 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/log"
|
2021-02-23 09:58:06 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/msgstream"
|
2021-01-22 09:36:18 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
|
2021-03-12 14:22:09 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
|
2021-01-22 09:36:18 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
|
2021-01-29 09:27:26 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proxynode"
|
2021-02-23 09:58:06 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
|
2021-03-23 01:49:50 +08:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/trace"
|
2021-01-22 09:36:18 +08:00
|
|
|
)
|
|
|
|
|
2021-03-05 11:16:23 +08:00
|
|
|
const (
|
|
|
|
GRPCMaxMagSize = 2 << 30
|
|
|
|
)
|
|
|
|
|
2021-01-22 09:36:18 +08:00
|
|
|
type Server struct {
|
2021-01-29 09:27:26 +08:00
|
|
|
ctx context.Context
|
|
|
|
wg sync.WaitGroup
|
2021-03-12 14:22:09 +08:00
|
|
|
proxynode *proxynode.ProxyNode
|
2021-01-29 09:27:26 +08:00
|
|
|
grpcServer *grpc.Server
|
2021-01-22 09:36:18 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
grpcErrChan chan error
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-02-23 11:40:30 +08:00
|
|
|
proxyServiceClient *grpcproxyserviceclient.Client
|
|
|
|
masterServiceClient *grpcmasterserviceclient.GrpcClient
|
|
|
|
dataServiceClient *grpcdataserviceclient.Client
|
2021-01-29 09:27:26 +08:00
|
|
|
queryServiceClient *grpcqueryserviceclient.Client
|
|
|
|
indexServiceClient *grpcindexserviceclient.Client
|
2021-02-23 09:58:06 +08:00
|
|
|
|
|
|
|
tracer opentracing.Tracer
|
|
|
|
closer io.Closer
|
2021-01-29 09:27:26 +08:00
|
|
|
}
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-02-08 14:30:54 +08:00
|
|
|
func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error) {
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-02-23 09:58:06 +08:00
|
|
|
var err error
|
2021-01-29 09:27:26 +08:00
|
|
|
server := &Server{
|
2021-01-29 17:08:31 +08:00
|
|
|
ctx: ctx,
|
2021-01-29 09:27:26 +08:00
|
|
|
grpcErrChan: make(chan error),
|
2021-01-28 20:51:44 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
server.proxynode, err = proxynode.NewProxyNode(server.ctx, factory)
|
2021-01-28 20:51:44 +08:00
|
|
|
if err != nil {
|
2021-01-29 09:27:26 +08:00
|
|
|
return nil, err
|
2021-01-28 20:51:44 +08:00
|
|
|
}
|
2021-01-29 09:27:26 +08:00
|
|
|
return server, err
|
|
|
|
}
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
func (s *Server) startGrpcLoop(grpcPort int) {
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
defer s.wg.Done()
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxynode", zap.Int("network port", grpcPort))
|
2021-01-29 09:27:26 +08:00
|
|
|
lis, err := net.Listen("tcp", ":"+strconv.Itoa(grpcPort))
|
2021-01-28 20:51:44 +08:00
|
|
|
if err != nil {
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Warn("proxynode", zap.String("Server:failed to listen:", err.Error()))
|
2021-01-29 09:27:26 +08:00
|
|
|
s.grpcErrChan <- err
|
|
|
|
return
|
2021-01-28 20:51:44 +08:00
|
|
|
}
|
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
ctx, cancel := context.WithCancel(s.ctx)
|
|
|
|
defer cancel()
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-02-26 17:44:24 +08:00
|
|
|
tracer := opentracing.GlobalTracer()
|
2021-03-08 15:49:42 +08:00
|
|
|
s.grpcServer = grpc.NewServer(
|
|
|
|
grpc.MaxRecvMsgSize(math.MaxInt32),
|
|
|
|
grpc.MaxSendMsgSize(math.MaxInt32),
|
|
|
|
grpc.UnaryInterceptor(
|
|
|
|
otgrpc.OpenTracingServerInterceptor(tracer)),
|
2021-02-26 17:44:24 +08:00
|
|
|
grpc.StreamInterceptor(
|
2021-03-05 11:16:23 +08:00
|
|
|
otgrpc.OpenTracingStreamServerInterceptor(tracer)),
|
|
|
|
grpc.MaxRecvMsgSize(GRPCMaxMagSize))
|
2021-01-29 09:27:26 +08:00
|
|
|
proxypb.RegisterProxyNodeServiceServer(s.grpcServer, s)
|
|
|
|
milvuspb.RegisterMilvusServiceServer(s.grpcServer, s)
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
go funcutil.CheckGrpcReady(ctx, s.grpcErrChan)
|
|
|
|
if err := s.grpcServer.Serve(lis); err != nil {
|
|
|
|
s.grpcErrChan <- err
|
2021-01-28 20:51:44 +08:00
|
|
|
}
|
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
}
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
func (s *Server) Run() error {
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
if err := s.init(); err != nil {
|
2021-01-29 17:29:31 +08:00
|
|
|
return err
|
2021-01-28 20:51:44 +08:00
|
|
|
}
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxy node init done ...")
|
2021-01-28 20:51:44 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
if err := s.start(); err != nil {
|
2021-01-28 20:51:44 +08:00
|
|
|
return err
|
|
|
|
}
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxy node start done ...")
|
2021-01-28 20:51:44 +08:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
func (s *Server) init() error {
|
2021-03-04 22:27:12 +08:00
|
|
|
ctx := context.Background()
|
2021-01-29 09:27:26 +08:00
|
|
|
var err error
|
2021-01-28 20:51:44 +08:00
|
|
|
Params.Init()
|
2021-02-23 18:08:17 +08:00
|
|
|
if !funcutil.CheckPortAvailable(Params.Port) {
|
|
|
|
Params.Port = funcutil.GetAvailablePort()
|
|
|
|
}
|
2021-02-20 10:15:37 +08:00
|
|
|
Params.LoadFromEnv()
|
|
|
|
Params.LoadFromArgs()
|
2021-01-29 09:27:26 +08:00
|
|
|
Params.Address = Params.IP + ":" + strconv.FormatInt(int64(Params.Port), 10)
|
2021-01-22 12:57:23 +08:00
|
|
|
|
2021-03-23 01:49:50 +08:00
|
|
|
proxynode.Params.Init()
|
|
|
|
log.Debug("init params done ...")
|
|
|
|
proxynode.Params.NetworkPort = Params.Port
|
|
|
|
proxynode.Params.IP = Params.IP
|
|
|
|
proxynode.Params.NetworkAddress = Params.Address
|
|
|
|
// for purpose of ID Allocator
|
|
|
|
proxynode.Params.MasterAddress = Params.MasterAddress
|
2021-01-29 17:29:31 +08:00
|
|
|
|
2021-03-23 01:49:50 +08:00
|
|
|
tracer, closer, err := trace.InitTracing(fmt.Sprintf("proxy_node ip: %s, port: %d", Params.IP, Params.Port))
|
2021-02-26 17:44:24 +08:00
|
|
|
if err != nil {
|
2021-03-23 01:49:50 +08:00
|
|
|
log.Error("proxy_node", zap.String("init trace err", err.Error()))
|
2021-02-26 17:44:24 +08:00
|
|
|
}
|
|
|
|
opentracing.SetGlobalTracer(tracer)
|
|
|
|
s.closer = closer
|
|
|
|
|
2021-03-23 01:49:50 +08:00
|
|
|
log.Debug("proxynode", zap.String("proxy host", Params.IP))
|
|
|
|
log.Debug("proxynode", zap.Int("proxy port", Params.Port))
|
|
|
|
log.Debug("proxynode", zap.String("proxy address", Params.Address))
|
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
defer func() {
|
2021-01-22 12:57:23 +08:00
|
|
|
if err != nil {
|
2021-01-29 09:27:26 +08:00
|
|
|
err2 := s.Stop()
|
|
|
|
if err2 != nil {
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("Init failed, and Stop failed")
|
2021-01-29 09:27:26 +08:00
|
|
|
}
|
2021-01-22 12:57:23 +08:00
|
|
|
}
|
2021-01-29 09:27:26 +08:00
|
|
|
}()
|
2021-01-22 12:57:23 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
s.wg.Add(1)
|
2021-01-29 17:08:31 +08:00
|
|
|
go s.startGrpcLoop(Params.Port)
|
2021-01-29 09:27:26 +08:00
|
|
|
// wait for grpc server loop start
|
|
|
|
err = <-s.grpcErrChan
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("create grpc server ...")
|
2021-01-29 09:27:26 +08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
2021-01-22 12:57:23 +08:00
|
|
|
}
|
2021-01-29 09:27:26 +08:00
|
|
|
|
2021-01-29 17:29:31 +08:00
|
|
|
s.proxyServiceClient = grpcproxyserviceclient.NewClient(Params.ProxyServiceAddress)
|
2021-01-29 09:27:26 +08:00
|
|
|
err = s.proxyServiceClient.Init()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
2021-01-22 12:57:23 +08:00
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.SetProxyServiceClient(s.proxyServiceClient)
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("set proxy service client ...")
|
2021-01-29 09:27:26 +08:00
|
|
|
|
|
|
|
masterServiceAddr := Params.MasterAddress
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxynode", zap.String("master address", masterServiceAddr))
|
2021-01-29 09:27:26 +08:00
|
|
|
timeout := 3 * time.Second
|
2021-02-23 11:40:30 +08:00
|
|
|
s.masterServiceClient, err = grpcmasterserviceclient.NewClient(masterServiceAddr, timeout)
|
2021-01-29 09:27:26 +08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
2021-01-22 12:57:23 +08:00
|
|
|
}
|
2021-01-29 09:27:26 +08:00
|
|
|
err = s.masterServiceClient.Init()
|
2021-01-22 12:57:23 +08:00
|
|
|
if err != nil {
|
2021-01-29 09:27:26 +08:00
|
|
|
return err
|
2021-01-22 12:57:23 +08:00
|
|
|
}
|
2021-03-22 16:36:10 +08:00
|
|
|
err = funcutil.WaitForComponentHealthy(ctx, s.masterServiceClient, "MasterService", 1000000, time.Millisecond*200)
|
2021-03-04 22:27:12 +08:00
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.SetMasterClient(s.masterServiceClient)
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("set master client ...")
|
2021-01-22 12:57:23 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
dataServiceAddr := Params.DataServiceAddress
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxynode", zap.String("data service address", dataServiceAddr))
|
2021-02-23 11:40:30 +08:00
|
|
|
s.dataServiceClient = grpcdataserviceclient.NewClient(dataServiceAddr)
|
2021-01-29 09:27:26 +08:00
|
|
|
err = s.dataServiceClient.Init()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.SetDataServiceClient(s.dataServiceClient)
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("set data service address ...")
|
2021-01-29 09:27:26 +08:00
|
|
|
|
|
|
|
indexServiceAddr := Params.IndexServerAddress
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxynode", zap.String("index server address", indexServiceAddr))
|
2021-01-29 09:27:26 +08:00
|
|
|
s.indexServiceClient = grpcindexserviceclient.NewClient(indexServiceAddr)
|
|
|
|
err = s.indexServiceClient.Init()
|
2021-01-22 09:36:18 +08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.SetIndexServiceClient(s.indexServiceClient)
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("set index service client ...")
|
2021-01-29 17:29:31 +08:00
|
|
|
|
2021-02-05 10:29:14 +08:00
|
|
|
queryServiceAddr := Params.QueryServiceAddress
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("proxynode", zap.String("query server address", queryServiceAddr))
|
2021-02-05 10:29:14 +08:00
|
|
|
s.queryServiceClient, err = grpcqueryserviceclient.NewClient(queryServiceAddr, timeout)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
err = s.queryServiceClient.Init()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.SetQueryServiceClient(s.queryServiceClient)
|
2021-03-10 09:56:09 +08:00
|
|
|
log.Debug("set query service client ...")
|
2021-01-22 09:36:18 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
s.proxynode.UpdateStateCode(internalpb.StateCode_Initializing)
|
2021-03-22 19:28:43 +08:00
|
|
|
log.Debug("proxynode",
|
|
|
|
zap.Any("state of proxynode", internalpb.StateCode_Initializing))
|
2021-01-22 09:36:18 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
if err := s.proxynode.Init(); err != nil {
|
|
|
|
log.Debug("proxynode", zap.String("proxynode init error", err.Error()))
|
2021-01-29 09:27:26 +08:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
2021-01-22 09:36:18 +08:00
|
|
|
|
2021-01-29 09:27:26 +08:00
|
|
|
func (s *Server) start() error {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.Start()
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) Stop() error {
|
|
|
|
var err error
|
2021-02-23 09:58:06 +08:00
|
|
|
s.closer.Close()
|
2021-01-22 09:36:18 +08:00
|
|
|
|
|
|
|
if s.grpcServer != nil {
|
|
|
|
s.grpcServer.GracefulStop()
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
err = s.proxynode.Stop()
|
2021-01-22 09:36:18 +08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
s.wg.Wait()
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetComponentStates(ctx context.Context, request *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
|
|
|
|
return s.proxynode.GetComponentStates(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) GetStatisticsChannel(ctx context.Context, request *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
|
|
|
|
return s.proxynode.GetStatisticsChannel(ctx)
|
|
|
|
}
|
|
|
|
|
2021-01-22 09:36:18 +08:00
|
|
|
func (s *Server) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.InvalidateCollectionMetaCache(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) CreateCollection(ctx context.Context, request *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.CreateCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) DropCollection(ctx context.Context, request *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.DropCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.HasCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) LoadCollection(ctx context.Context, request *milvuspb.LoadCollectionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.LoadCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) ReleaseCollection(ctx context.Context, request *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.ReleaseCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) DescribeCollection(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.DescribeCollection(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetCollectionStatistics(ctx context.Context, request *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) {
|
|
|
|
return s.proxynode.GetCollectionStatistics(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
|
|
|
return s.proxynode.ShowCollections(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) CreatePartition(ctx context.Context, request *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.CreatePartition(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) DropPartition(ctx context.Context, request *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.DropPartition(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) HasPartition(ctx context.Context, request *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.HasPartition(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) {
|
|
|
|
return s.proxynode.LoadPartitions(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) {
|
|
|
|
return s.proxynode.ReleasePartitions(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetPartitionStatistics(ctx context.Context, request *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) {
|
|
|
|
return s.proxynode.GetPartitionStatistics(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
|
|
|
return s.proxynode.ShowPartitions(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) CreateIndex(ctx context.Context, request *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.CreateIndex(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-02-20 18:30:37 +08:00
|
|
|
func (s *Server) DropIndex(ctx context.Context, request *milvuspb.DropIndexRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.DropIndex(ctx, request)
|
2021-02-20 18:30:37 +08:00
|
|
|
}
|
|
|
|
|
2021-01-22 09:36:18 +08:00
|
|
|
func (s *Server) DescribeIndex(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.DescribeIndex(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) {
|
|
|
|
return s.proxynode.GetIndexState(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) Insert(ctx context.Context, request *milvuspb.InsertRequest) (*milvuspb.InsertResponse, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.Insert(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) Search(ctx context.Context, request *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.Search(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*commonpb.Status, error) {
|
2021-03-12 14:22:09 +08:00
|
|
|
return s.proxynode.Flush(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
|
|
|
|
return s.proxynode.GetDdChannel(ctx, request)
|
2021-01-22 09:36:18 +08:00
|
|
|
}
|
2021-02-03 18:55:00 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetPersistentSegmentInfo(ctx context.Context, request *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) {
|
|
|
|
return s.proxynode.GetPersistentSegmentInfo(ctx, request)
|
2021-02-03 18:55:00 +08:00
|
|
|
}
|
2021-02-04 14:37:12 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) GetQuerySegmentInfo(ctx context.Context, request *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) {
|
|
|
|
return s.proxynode.GetQuerySegmentInfo(ctx, request)
|
2021-02-04 14:37:12 +08:00
|
|
|
|
|
|
|
}
|
2021-03-04 22:27:12 +08:00
|
|
|
|
2021-03-12 14:22:09 +08:00
|
|
|
func (s *Server) RegisterLink(ctx context.Context, request *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) {
|
|
|
|
return s.proxynode.RegisterLink(ctx, request)
|
2021-03-04 22:27:12 +08:00
|
|
|
}
|