From ee5e99a8153d316e7fa66eb8f166f689e9bbba0b Mon Sep 17 00:00:00 2001 From: fanmin shi Date: Mon, 22 May 2017 16:57:40 -0700 Subject: [PATCH] v3rpc: change grpc max recv size as needed. --- etcdserver/api/v3rpc/grpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etcdserver/api/v3rpc/grpc.go b/etcdserver/api/v3rpc/grpc.go index 88174e3bac24..94b0b0b4ce08 100644 --- a/etcdserver/api/v3rpc/grpc.go +++ b/etcdserver/api/v3rpc/grpc.go @@ -36,8 +36,9 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config) *grpc.Server { } opts = append(opts, grpc.UnaryInterceptor(newUnaryInterceptor(s))) opts = append(opts, grpc.StreamInterceptor(newStreamInterceptor(s))) - + opts = append(opts, grpc.MaxMsgSize(int(s.Cfg.MaxRequestBytes))) grpcServer := grpc.NewServer(opts...) + pb.RegisterKVServer(grpcServer, NewQuotaKVServer(s)) pb.RegisterWatchServer(grpcServer, NewWatchServer(s)) pb.RegisterLeaseServer(grpcServer, NewQuotaLeaseServer(s))