提交 55fc3f56 编写于 作者: N neza2017 提交者: yefu.chen

Set grpc max recv mag as math.MaxInt32

Signed-off-by: Nneza2017 <yefu.chen@zilliz.com>
上级 014c4fe8
......@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"math"
"net"
"strconv"
"sync"
......@@ -73,8 +74,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
log.Debug("DataNode address", zap.String("address", addr))
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
datapb.RegisterDataNodeServer(s.grpcServer, s)
......
......@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"math"
"net"
"strconv"
"sync"
......@@ -134,8 +135,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
datapb.RegisterDataServiceServer(s.grpcServer, s)
......
......@@ -3,6 +3,7 @@ package grpcindexnode
import (
"context"
"log"
"math"
"net"
"strconv"
"sync"
......@@ -61,8 +62,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
indexpb.RegisterIndexNodeServer(s.grpcServer, s)
......
......@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log"
"math"
"net"
"strconv"
"sync"
......@@ -133,8 +134,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
indexpb.RegisterIndexServiceServer(s.grpcServer, s)
......
......@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"math"
"net"
"strconv"
"sync"
......@@ -209,8 +210,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
masterpb.RegisterMasterServiceServer(s.grpcServer, s)
......
......@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log"
"math"
"net"
"strconv"
"sync"
......@@ -83,8 +84,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)),
grpc.MaxRecvMsgSize(GRPCMaxMagSize))
......
......@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log"
"math"
"net"
"strconv"
"sync"
......@@ -116,8 +117,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
proxypb.RegisterProxyServiceServer(s.grpcServer, s)
......
......@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"io"
"math"
"net"
"strconv"
"sync"
......@@ -221,8 +222,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
log.Debug("QueryNode", zap.String("address", addr))
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
querypb.RegisterQueryNodeServer(s.grpcServer, s)
......
......@@ -2,6 +2,7 @@ package grpcqueryservice
import (
"context"
"math"
"net"
"strconv"
"sync"
......@@ -152,8 +153,11 @@ func (s *Server) startGrpcLoop(grpcPort int) {
defer cancel()
tracer := opentracing.GlobalTracer()
s.grpcServer = grpc.NewServer(grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
s.grpcServer = grpc.NewServer(
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.MaxSendMsgSize(math.MaxInt32),
grpc.UnaryInterceptor(
otgrpc.OpenTracingServerInterceptor(tracer)),
grpc.StreamInterceptor(
otgrpc.OpenTracingStreamServerInterceptor(tracer)))
querypb.RegisterQueryServiceServer(s.grpcServer, s)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册