Enlarge Proxy node max size of reveivable grpc message

Signed-off-by: BossZou <yinghao.zou@zilliz.com>
This commit is contained in:
BossZou 2021-03-05 11:16:23 +08:00 committed by yefu.chen
parent 3489362137
commit 1efcf605e2

View File

@ -30,6 +30,10 @@ import (
"github.com/zilliztech/milvus-distributed/internal/util/funcutil"
)
const (
GRPCMaxMagSize = 2 << 30
)
type Server struct {
ctx context.Context
wg sync.WaitGroup
@ -82,7 +86,8 @@ func (s *Server) startGrpcLoop(grpcPort int) {
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
otgrpc.OpenTracingStreamServerInterceptor(tracer)),
grpc.MaxRecvMsgSize(GRPCMaxMagSize))
proxypb.RegisterProxyNodeServiceServer(s.grpcServer, s)
milvuspb.RegisterMilvusServiceServer(s.grpcServer, s)