Skip to content

Commit

Permalink
update the comment for MaxConcurrentStreams to clearly state it's the…
Browse files Browse the repository at this point in the history
… max value for each client.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
  • Loading branch information
ahrtr committed Jun 28, 2022
1 parent d745eef commit f672f28
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type ServerConfig struct {
MaxRequestBytes uint

// MaxConcurrentStreams specifies the max number of concurrent
// streams that the server will accept.
// streams that each client can open at a time.
MaxConcurrentStreams uint32

WarningApplyDuration time.Duration
Expand Down
2 changes: 1 addition & 1 deletion server/embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ type Config struct {
MaxRequestBytes uint `json:"max-request-bytes"`

// MaxConcurrentStreams specifies the number of concurrent streams
// that the server can accept.
// that each client can open at a time.
MaxConcurrentStreams uint32 `json:"max-concurrent-streams"`

LPUrls, LCUrls []url.URL
Expand Down
2 changes: 1 addition & 1 deletion server/etcdmain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion server/etcdmain/grpc_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion server/etcdmain/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit f672f28

Please sign in to comment.