diff --git a/server/etcdmain/grpc_proxy.go b/server/etcdmain/grpc_proxy.go index 01fe1b80b..5946361b8 100644 --- a/server/etcdmain/grpc_proxy.go +++ b/server/etcdmain/grpc_proxy.go @@ -29,7 +29,6 @@ import ( "path/filepath" "time" - grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" @@ -481,12 +480,8 @@ func newGRPCProxyServer(lg *zap.Logger, client *clientv3.Client) *grpc.Server { } gopts := []grpc.ServerOption{ - grpc.StreamInterceptor(grpc_middleware.ChainStreamServer( - grpcChainStreamList..., - )), - grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( - grpcChainUnaryList..., - )), + grpc.ChainStreamInterceptor(grpcChainStreamList...), + grpc.ChainUnaryInterceptor(grpcChainUnaryList...), grpc.MaxConcurrentStreams(math.MaxUint32), } if grpcKeepAliveMinTime > time.Duration(0) { diff --git a/server/etcdserver/api/v3rpc/grpc.go b/server/etcdserver/api/v3rpc/grpc.go index d4368c503..6521190f8 100644 --- a/server/etcdserver/api/v3rpc/grpc.go +++ b/server/etcdserver/api/v3rpc/grpc.go @@ -18,7 +18,6 @@ import ( "crypto/tls" "math" - grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "google.golang.org/grpc" @@ -61,8 +60,8 @@ func Server(s *etcdserver.EtcdServer, tls *tls.Config, interceptor grpc.UnarySer } - opts = append(opts, grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(chainUnaryInterceptors...))) - opts = append(opts, grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(chainStreamInterceptors...))) + opts = append(opts, grpc.ChainUnaryInterceptor(chainUnaryInterceptors...)) + opts = append(opts, grpc.ChainStreamInterceptor(chainStreamInterceptors...)) opts = append(opts, grpc.MaxRecvMsgSize(int(s.Cfg.MaxRequestBytes+grpcOverheadBytes))) opts = append(opts, grpc.MaxSendMsgSize(maxSendBytes))