mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 19:39:21 +08:00
Set grpc max recv mag as math.MaxInt32
Signed-off-by: neza2017 <yefu.chen@zilliz.com>
This commit is contained in:
parent
014c4fe8ce
commit
55fc3f56aa
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user