diff --git a/pkg/flags/uint32.go b/pkg/flags/uint32.go index bbef7df6a..496730a45 100644 --- a/pkg/flags/uint32.go +++ b/pkg/flags/uint32.go @@ -21,7 +21,7 @@ import ( type uint32Value uint32 -// NewUint32Value creates a uint32Value instance with the default value `v`. +// NewUint32Value creates an uint32 instance with the provided value. func NewUint32Value(v uint32) *uint32Value { val := new(uint32Value) *val = uint32Value(v) diff --git a/server/config/config.go b/server/config/config.go index d471035d8..9ecfc1463 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -129,8 +129,8 @@ type ServerConfig struct { // MaxRequestBytes is the maximum request size to send over raft. MaxRequestBytes uint - // MaxConcurrentStreams specifies the max number of concurrent - // streams that the server will accept. + // MaxConcurrentStreams specifies the maximum number of concurrent + // streams that each client can open at a time. MaxConcurrentStreams uint32 WarningApplyDuration time.Duration diff --git a/server/embed/config.go b/server/embed/config.go index 12cf65698..4e1f6a19c 100644 --- a/server/embed/config.go +++ b/server/embed/config.go @@ -207,8 +207,8 @@ type Config struct { MaxTxnOps uint `json:"max-txn-ops"` MaxRequestBytes uint `json:"max-request-bytes"` - // MaxConcurrentStreams specifies the number of concurrent streams - // that the server can accept. + // MaxConcurrentStreams specifies the maximum number of concurrent + // streams that each client can open at a time. MaxConcurrentStreams uint32 `json:"max-concurrent-streams"` LPUrls, LCUrls []url.URL diff --git a/server/etcdmain/config.go b/server/etcdmain/config.go index 96b54cada..28f81e33e 100644 --- a/server/etcdmain/config.go +++ b/server/etcdmain/config.go @@ -138,7 +138,7 @@ func newConfig() *config { fs.BoolVar(&cfg.ec.SocketOpts.ReusePort, "socket-reuse-port", cfg.ec.SocketOpts.ReusePort, "Enable to set socket option SO_REUSEPORT on listeners allowing rebinding of a port already in use.") fs.BoolVar(&cfg.ec.SocketOpts.ReuseAddress, "socket-reuse-address", cfg.ec.SocketOpts.ReuseAddress, "Enable to set socket option SO_REUSEADDR on listeners allowing binding to an address in `TIME_WAIT` state.") - fs.Var(flags.NewUint32Value(cfg.ec.MaxConcurrentStreams), "max-concurrent-streams", "Maximum concurrent streams that each client may have open at a time.") + fs.Var(flags.NewUint32Value(cfg.ec.MaxConcurrentStreams), "max-concurrent-streams", "Maximum concurrent streams that each client can open at a time.") // raft connection timeouts fs.DurationVar(&rafthttp.ConnReadTimeout, "raft-read-timeout", rafthttp.DefaultConnReadTimeout, "Read timeout set on each rafthttp connection") diff --git a/server/etcdmain/grpc_proxy.go b/server/etcdmain/grpc_proxy.go index 492171430..b13520695 100644 --- a/server/etcdmain/grpc_proxy.go +++ b/server/etcdmain/grpc_proxy.go @@ -162,7 +162,7 @@ func newGRPCProxyStartCommand() *cobra.Command { cmd.Flags().BoolVar(&grpcProxyDebug, "debug", false, "Enable debug-level logging for grpc-proxy.") - cmd.Flags().Uint32Var(&maxConcurrentStreams, "max-concurrent-streams", math.MaxUint32, "Maximum concurrent streams that each client may have open at a time.") + cmd.Flags().Uint32Var(&maxConcurrentStreams, "max-concurrent-streams", math.MaxUint32, "Maximum concurrent streams that each client can open at a time.") return &cmd } diff --git a/server/etcdmain/help.go b/server/etcdmain/help.go index c8bc56bc2..a7f569a8e 100644 --- a/server/etcdmain/help.go +++ b/server/etcdmain/help.go @@ -82,7 +82,7 @@ Member: --max-request-bytes '1572864' Maximum client request size in bytes the server will accept. --max-concurrent-streams 'math.MaxUint32' - Maximum concurrent streams that each client may have open at a time. + Maximum concurrent streams that each client can open at a time. --grpc-keepalive-min-time '5s' Minimum duration interval that a client should wait before pinging server. --grpc-keepalive-interval '2h' diff --git a/tests/e2e/v3_curl_maxstream_test.go b/tests/e2e/v3_curl_maxstream_test.go index 586306eda..44dfd3dc1 100644 --- a/tests/e2e/v3_curl_maxstream_test.go +++ b/tests/e2e/v3_curl_maxstream_test.go @@ -83,7 +83,7 @@ func testV3CurlMaxStream(t *testing.T, reachLimit bool, opts ...ctlOption) { t.Log("Generating configuration for creating cluster.") cx := getDefaultCtlCtx(t) cx.applyOpts(opts) - // We must set the clusterSize to 1, otherwise different streams may + // We must set the `ClusterSize` to 1, otherwise different streams may // connect to different members, accordingly it's difficult to test the // behavior. cx.cfg.ClusterSize = 1 @@ -114,8 +114,8 @@ func testV3CurlMaxStream(t *testing.T, reachLimit bool, opts ...ctlOption) { submitConcurrentWatch(cx, int(concurrentNumber), &wg, errCh) submitRangeAfterConcurrentWatch(cx, expectedResponse) - // Step 4: check the watch errors. Note that we ony check the watch error - // before closing cluster. Once we closed the cluster, the watch must run + // Step 4: check the watch errors. Note that we only check the watch error + // before closing cluster. Once we close the cluster, the watch must run // into error, and we should ignore them by then. t.Log("Checking watch error.") select {