From 38f4a98abc144bda9c80e579c51e3d0c6717c176 Mon Sep 17 00:00:00 2001 From: Henry Robinson Date: Fri, 9 Aug 2024 15:09:33 +0100 Subject: [PATCH] Add comments Signed-off-by: Henry Robinson --- go/vt/grpccommon/options.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go/vt/grpccommon/options.go b/go/vt/grpccommon/options.go index c4e403d312a..9d8e348ccb8 100644 --- a/go/vt/grpccommon/options.go +++ b/go/vt/grpccommon/options.go @@ -30,6 +30,8 @@ var ( // accept. Larger messages will be rejected. // Note: We're using 16 MiB as default value because that's the default in MySQL maxMessageSize = 16 * 1024 * 1024 + // These options override maxMessageSize if > 0, allowing us to control the max + // size sending independently from receiving. maxMsgRecvSize = 0 maxMsgSendSize = 0 // enableTracing sets a flag to enable grpc client/server tracing. @@ -45,8 +47,8 @@ var ( // command-line arguments. func RegisterFlags(fs *pflag.FlagSet) { fs.IntVar(&maxMessageSize, "grpc_max_message_size", maxMessageSize, "Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'.") - fs.IntVar(&maxMsgSendSize, "grpc_max_message_send_size", maxMsgSendSize, "") - fs.IntVar(&maxMsgRecvSize, "grpc_max_message_recv_size", maxMsgRecvSize, "") + fs.IntVar(&maxMsgSendSize, "grpc_max_message_send_size", maxMsgSendSize, "Maximum allowed RPC message size when sending. If 0, defaults to grpc_max_message_size.") + fs.IntVar(&maxMsgRecvSize, "grpc_max_message_recv_size", maxMsgRecvSize, "Maximum allowed RPC message size when receiving. If 0, defaults to grpc_max_message_size.") fs.BoolVar(&enableTracing, "grpc_enable_tracing", enableTracing, "Enable gRPC tracing.") fs.BoolVar(&enablePrometheus, "grpc_prometheus", enablePrometheus, "Enable gRPC monitoring with Prometheus.") }