2021-04-19 03:12:56 +00:00
|
|
|
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
// with the License. You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
|
|
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
|
|
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
package grpcmasterservice
|
2021-01-19 06:44:03 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2021-02-24 01:48:17 +00:00
|
|
|
"io"
|
2021-03-08 07:49:42 +00:00
|
|
|
"math"
|
2021-01-19 06:44:03 +00:00
|
|
|
"net"
|
2021-02-27 02:11:52 +00:00
|
|
|
"strconv"
|
2021-01-19 06:44:03 +00:00
|
|
|
"sync"
|
2021-02-27 02:11:52 +00:00
|
|
|
"time"
|
2021-01-19 06:44:03 +00:00
|
|
|
|
2021-02-26 09:44:24 +00:00
|
|
|
otgrpc "github.com/opentracing-contrib/go-grpc"
|
2021-02-24 08:25:40 +00:00
|
|
|
"github.com/opentracing/opentracing-go"
|
2021-02-27 02:11:52 +00:00
|
|
|
"go.uber.org/zap"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
dsc "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice/client"
|
|
|
|
isc "github.com/zilliztech/milvus-distributed/internal/distributed/indexservice/client"
|
|
|
|
psc "github.com/zilliztech/milvus-distributed/internal/distributed/proxyservice/client"
|
|
|
|
qsc "github.com/zilliztech/milvus-distributed/internal/distributed/queryservice/client"
|
2021-02-24 08:25:40 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/log"
|
2021-01-19 06:44:03 +00:00
|
|
|
cms "github.com/zilliztech/milvus-distributed/internal/masterservice"
|
2021-02-08 06:30:54 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/msgstream"
|
2021-03-06 09:47:11 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/types"
|
2021-03-22 17:49:50 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/trace"
|
2021-03-06 09:47:11 +00:00
|
|
|
|
2021-01-19 06:44:03 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
|
2021-03-12 06:22:09 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
|
2021-01-19 06:44:03 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/masterpb"
|
|
|
|
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
|
2021-02-24 08:25:40 +00:00
|
|
|
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
|
2021-01-19 06:44:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// grpc wrapper
|
2021-02-23 03:40:30 +00:00
|
|
|
type Server struct {
|
2021-03-06 09:47:11 +00:00
|
|
|
masterService *cms.Core
|
|
|
|
grpcServer *grpc.Server
|
|
|
|
grpcErrChan chan error
|
2021-02-23 03:40:30 +00:00
|
|
|
|
|
|
|
wg sync.WaitGroup
|
2021-01-19 06:44:03 +00:00
|
|
|
|
|
|
|
ctx context.Context
|
|
|
|
cancel context.CancelFunc
|
2021-02-23 03:40:30 +00:00
|
|
|
|
2021-03-06 09:47:11 +00:00
|
|
|
proxyService types.ProxyService
|
|
|
|
dataService types.DataService
|
|
|
|
indexService types.IndexService
|
|
|
|
queryService types.QueryService
|
2021-02-23 03:40:30 +00:00
|
|
|
|
|
|
|
connectProxyService bool
|
|
|
|
connectDataService bool
|
|
|
|
connectIndexService bool
|
|
|
|
connectQueryService bool
|
2021-02-24 01:48:17 +00:00
|
|
|
|
|
|
|
closer io.Closer
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func NewServer(ctx context.Context, factory msgstream.Factory) (*Server, error) {
|
|
|
|
|
|
|
|
ctx1, cancel := context.WithCancel(ctx)
|
|
|
|
|
|
|
|
s := &Server{
|
|
|
|
ctx: ctx1,
|
|
|
|
cancel: cancel,
|
|
|
|
grpcErrChan: make(chan error),
|
|
|
|
connectDataService: true,
|
|
|
|
connectProxyService: true,
|
|
|
|
connectIndexService: true,
|
|
|
|
connectQueryService: true,
|
|
|
|
}
|
|
|
|
|
2021-03-22 17:49:50 +00:00
|
|
|
var err error
|
2021-03-06 09:47:11 +00:00
|
|
|
s.masterService, err = cms.NewCore(s.ctx, factory)
|
2021-02-23 03:40:30 +00:00
|
|
|
if err != nil {
|
2021-01-19 06:44:03 +00:00
|
|
|
return nil, err
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
return s, err
|
|
|
|
}
|
2021-02-08 06:30:54 +00:00
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) Run() error {
|
|
|
|
if err := s.init(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := s.start(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) init() error {
|
|
|
|
Params.Init()
|
2021-03-22 17:49:50 +00:00
|
|
|
|
|
|
|
cms.Params.Init()
|
|
|
|
log.Debug("grpc init done ...")
|
|
|
|
|
2021-02-26 09:44:24 +00:00
|
|
|
ctx := context.Background()
|
2021-02-24 01:48:17 +00:00
|
|
|
|
2021-03-26 07:13:33 +00:00
|
|
|
closer := trace.InitTracing("master_service")
|
2021-03-22 17:49:50 +00:00
|
|
|
s.closer = closer
|
|
|
|
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("init params done")
|
2021-02-23 03:40:30 +00:00
|
|
|
|
2021-03-26 07:13:33 +00:00
|
|
|
err := s.startGrpc()
|
2021-01-19 06:44:03 +00:00
|
|
|
if err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
return err
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
s.masterService.UpdateStateCode(internalpb.StateCode_Initializing)
|
2021-02-23 03:40:30 +00:00
|
|
|
|
|
|
|
if s.connectProxyService {
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("proxy service", zap.String("address", Params.ProxyServiceAddress))
|
2021-02-23 03:40:30 +00:00
|
|
|
proxyService := psc.NewClient(Params.ProxyServiceAddress)
|
|
|
|
if err := proxyService.Init(); err != nil {
|
|
|
|
panic(err)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-22 08:36:10 +00:00
|
|
|
err := funcutil.WaitForComponentInitOrHealthy(ctx, proxyService, "ProxyService", 1000000, 200*time.Millisecond)
|
2021-02-23 03:40:30 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-01-19 06:44:03 +00:00
|
|
|
|
2021-03-06 09:47:11 +00:00
|
|
|
if err = s.masterService.SetProxyService(ctx, proxyService); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
panic(err)
|
|
|
|
}
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
if s.connectDataService {
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("data service", zap.String("address", Params.DataServiceAddress))
|
2021-02-23 03:40:30 +00:00
|
|
|
dataService := dsc.NewClient(Params.DataServiceAddress)
|
|
|
|
if err := dataService.Init(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if err := dataService.Start(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-03-22 08:36:10 +00:00
|
|
|
err := funcutil.WaitForComponentInitOrHealthy(ctx, dataService, "DataService", 1000000, 200*time.Millisecond)
|
2021-02-23 03:40:30 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-01-19 06:44:03 +00:00
|
|
|
|
2021-03-06 09:47:11 +00:00
|
|
|
if err = s.masterService.SetDataService(ctx, dataService); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.connectIndexService {
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("index service", zap.String("address", Params.IndexServiceAddress))
|
2021-02-23 03:40:30 +00:00
|
|
|
indexService := isc.NewClient(Params.IndexServiceAddress)
|
|
|
|
if err := indexService.Init(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-01-19 06:44:03 +00:00
|
|
|
|
2021-03-13 06:42:53 +00:00
|
|
|
if err := s.masterService.SetIndexService(indexService); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
panic(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.connectQueryService {
|
|
|
|
queryService, err := qsc.NewClient(Params.QueryServiceAddress, 5*time.Second)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if err = queryService.Init(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if err = queryService.Start(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2021-03-13 06:42:53 +00:00
|
|
|
if err = s.masterService.SetQueryService(queryService); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
2021-03-06 09:47:11 +00:00
|
|
|
if err := s.masterService.Init(); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) startGrpc() error {
|
|
|
|
s.wg.Add(1)
|
|
|
|
go s.startGrpcLoop(Params.Port)
|
|
|
|
// wait for grpc server loop start
|
|
|
|
err := <-s.grpcErrChan
|
2021-01-19 06:44:03 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) startGrpcLoop(grpcPort int) {
|
|
|
|
|
|
|
|
defer s.wg.Done()
|
|
|
|
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("start grpc ", zap.Int("port", grpcPort))
|
2021-02-23 03:40:30 +00:00
|
|
|
lis, err := net.Listen("tcp", ":"+strconv.Itoa(grpcPort))
|
|
|
|
if err != nil {
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Error("GrpcServer:failed to listen", zap.String("error", err.Error()))
|
2021-02-23 03:40:30 +00:00
|
|
|
s.grpcErrChan <- err
|
|
|
|
return
|
2021-01-25 10:33:10 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
ctx, cancel := context.WithCancel(s.ctx)
|
|
|
|
defer cancel()
|
|
|
|
|
2021-02-26 09:44:24 +00:00
|
|
|
tracer := opentracing.GlobalTracer()
|
2021-03-08 07:49:42 +00:00
|
|
|
s.grpcServer = grpc.NewServer(
|
|
|
|
grpc.MaxRecvMsgSize(math.MaxInt32),
|
|
|
|
grpc.MaxSendMsgSize(math.MaxInt32),
|
|
|
|
grpc.UnaryInterceptor(
|
|
|
|
otgrpc.OpenTracingServerInterceptor(tracer)),
|
2021-02-26 09:44:24 +00:00
|
|
|
grpc.StreamInterceptor(
|
|
|
|
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
|
2021-02-23 03:40:30 +00:00
|
|
|
masterpb.RegisterMasterServiceServer(s.grpcServer, s)
|
|
|
|
|
|
|
|
go funcutil.CheckGrpcReady(ctx, s.grpcErrChan)
|
|
|
|
if err := s.grpcServer.Serve(lis); err != nil {
|
|
|
|
s.grpcErrChan <- err
|
2021-01-25 10:33:10 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
|
2021-01-25 10:33:10 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) start() error {
|
2021-02-27 02:11:52 +00:00
|
|
|
log.Debug("Master Core start ...")
|
2021-03-06 09:47:11 +00:00
|
|
|
if err := s.masterService.Start(); err != nil {
|
2021-02-23 03:40:30 +00:00
|
|
|
return err
|
2021-01-25 10:33:10 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
return nil
|
2021-01-25 10:33:10 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) Stop() error {
|
2021-03-22 17:49:50 +00:00
|
|
|
if s.closer != nil {
|
|
|
|
if err := s.closer.Close(); err != nil {
|
2021-03-30 02:52:42 +00:00
|
|
|
log.Error("close opentracing", zap.Error(err))
|
2021-03-22 17:49:50 +00:00
|
|
|
}
|
2021-02-24 01:48:17 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
if s.proxyService != nil {
|
2021-03-29 01:50:52 +00:00
|
|
|
if err := s.proxyService.Stop(); err != nil {
|
|
|
|
log.Debug("close proxyService client", zap.Error(err))
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
}
|
|
|
|
if s.indexService != nil {
|
2021-03-29 01:50:52 +00:00
|
|
|
if err := s.indexService.Stop(); err != nil {
|
|
|
|
log.Debug("close indexService client", zap.Error(err))
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
}
|
|
|
|
if s.dataService != nil {
|
2021-03-29 01:50:52 +00:00
|
|
|
if err := s.dataService.Stop(); err != nil {
|
|
|
|
log.Debug("close dataService client", zap.Error(err))
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
}
|
|
|
|
if s.queryService != nil {
|
2021-03-29 01:50:52 +00:00
|
|
|
if err := s.queryService.Stop(); err != nil {
|
|
|
|
log.Debug("close queryService client", zap.Error(err))
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
}
|
2021-03-06 09:47:11 +00:00
|
|
|
if s.masterService != nil {
|
2021-03-29 01:50:52 +00:00
|
|
|
if err := s.masterService.Stop(); err != nil {
|
|
|
|
log.Debug("close masterService", zap.Error(err))
|
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
}
|
|
|
|
s.cancel()
|
|
|
|
if s.grpcServer != nil {
|
|
|
|
s.grpcServer.GracefulStop()
|
2021-02-05 06:09:55 +00:00
|
|
|
}
|
2021-02-23 03:40:30 +00:00
|
|
|
s.wg.Wait()
|
|
|
|
return nil
|
2021-02-05 06:09:55 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) GetComponentStates(ctx context.Context, req *internalpb.GetComponentStatesRequest) (*internalpb.ComponentStates, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.GetComponentStates(ctx)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
//receiver time tick from proxy service, and put it into this channel
|
|
|
|
func (s *Server) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
|
|
|
|
return s.masterService.GetTimeTickChannel(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
//just define a channel, not used currently
|
|
|
|
func (s *Server) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
|
|
|
|
return s.masterService.GetStatisticsChannel(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
//receive ddl from rpc and time tick from proxy service, and put them into this channel
|
|
|
|
func (s *Server) GetDdChannel(ctx context.Context, req *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
|
|
|
|
return s.masterService.GetDdChannel(ctx)
|
|
|
|
}
|
|
|
|
|
2021-01-19 06:44:03 +00:00
|
|
|
//DDL request
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) CreateCollection(ctx context.Context, in *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.CreateCollection(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DropCollection(ctx context.Context, in *milvuspb.DropCollectionRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DropCollection(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) HasCollection(ctx context.Context, in *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.HasCollection(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DescribeCollection(ctx context.Context, in *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DescribeCollection(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) ShowCollections(ctx context.Context, in *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.ShowCollections(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.CreatePartition(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DropPartition(ctx context.Context, in *milvuspb.DropPartitionRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DropPartition(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) HasPartition(ctx context.Context, in *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.HasPartition(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) ShowPartitions(ctx context.Context, in *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.ShowPartitions(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//index builder service
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) CreateIndex(ctx context.Context, in *milvuspb.CreateIndexRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.CreateIndex(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DropIndex(ctx context.Context, in *milvuspb.DropIndexRequest) (*commonpb.Status, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DropIndex(ctx, in)
|
2021-02-20 07:38:44 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DescribeIndex(ctx context.Context, in *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DescribeIndex(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//global timestamp allocator
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) AllocTimestamp(ctx context.Context, in *masterpb.AllocTimestampRequest) (*masterpb.AllocTimestampResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.AllocTimestamp(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) AllocID(ctx context.Context, in *masterpb.AllocIDRequest) (*masterpb.AllocIDResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.AllocID(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-02-23 03:40:30 +00:00
|
|
|
func (s *Server) DescribeSegment(ctx context.Context, in *milvuspb.DescribeSegmentRequest) (*milvuspb.DescribeSegmentResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.DescribeSegment(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 06:22:09 +00:00
|
|
|
func (s *Server) ShowSegments(ctx context.Context, in *milvuspb.ShowSegmentsRequest) (*milvuspb.ShowSegmentsResponse, error) {
|
2021-03-06 09:47:11 +00:00
|
|
|
return s.masterService.ShowSegments(ctx, in)
|
2021-01-19 06:44:03 +00:00
|
|
|
}
|