mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
update the comment for MaxConcurrentStreams to clearly state it's the max value for each client.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
f40b676701
commit
1a6fe4dbc6
@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
type uint32Value uint32
|
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 {
|
func NewUint32Value(v uint32) *uint32Value {
|
||||||
val := new(uint32Value)
|
val := new(uint32Value)
|
||||||
*val = uint32Value(v)
|
*val = uint32Value(v)
|
||||||
|
@ -129,8 +129,8 @@ type ServerConfig struct {
|
|||||||
// MaxRequestBytes is the maximum request size to send over raft.
|
// MaxRequestBytes is the maximum request size to send over raft.
|
||||||
MaxRequestBytes uint
|
MaxRequestBytes uint
|
||||||
|
|
||||||
// MaxConcurrentStreams specifies the max number of concurrent
|
// MaxConcurrentStreams specifies the maximum number of concurrent
|
||||||
// streams that the server will accept.
|
// streams that each client can open at a time.
|
||||||
MaxConcurrentStreams uint32
|
MaxConcurrentStreams uint32
|
||||||
|
|
||||||
WarningApplyDuration time.Duration
|
WarningApplyDuration time.Duration
|
||||||
|
@ -207,8 +207,8 @@ type Config struct {
|
|||||||
MaxTxnOps uint `json:"max-txn-ops"`
|
MaxTxnOps uint `json:"max-txn-ops"`
|
||||||
MaxRequestBytes uint `json:"max-request-bytes"`
|
MaxRequestBytes uint `json:"max-request-bytes"`
|
||||||
|
|
||||||
// MaxConcurrentStreams specifies the number of concurrent streams
|
// MaxConcurrentStreams specifies the maximum number of concurrent
|
||||||
// that the server can accept.
|
// streams that each client can open at a time.
|
||||||
MaxConcurrentStreams uint32 `json:"max-concurrent-streams"`
|
MaxConcurrentStreams uint32 `json:"max-concurrent-streams"`
|
||||||
|
|
||||||
LPUrls, LCUrls []url.URL
|
LPUrls, LCUrls []url.URL
|
||||||
|
@ -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.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.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
|
// raft connection timeouts
|
||||||
fs.DurationVar(&rafthttp.ConnReadTimeout, "raft-read-timeout", rafthttp.DefaultConnReadTimeout, "Read timeout set on each rafthttp connection")
|
fs.DurationVar(&rafthttp.ConnReadTimeout, "raft-read-timeout", rafthttp.DefaultConnReadTimeout, "Read timeout set on each rafthttp connection")
|
||||||
|
@ -162,7 +162,7 @@ func newGRPCProxyStartCommand() *cobra.Command {
|
|||||||
|
|
||||||
cmd.Flags().BoolVar(&grpcProxyDebug, "debug", false, "Enable debug-level logging for grpc-proxy.")
|
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
|
return &cmd
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ Member:
|
|||||||
--max-request-bytes '1572864'
|
--max-request-bytes '1572864'
|
||||||
Maximum client request size in bytes the server will accept.
|
Maximum client request size in bytes the server will accept.
|
||||||
--max-concurrent-streams 'math.MaxUint32'
|
--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'
|
--grpc-keepalive-min-time '5s'
|
||||||
Minimum duration interval that a client should wait before pinging server.
|
Minimum duration interval that a client should wait before pinging server.
|
||||||
--grpc-keepalive-interval '2h'
|
--grpc-keepalive-interval '2h'
|
||||||
|
@ -83,7 +83,7 @@ func testV3CurlMaxStream(t *testing.T, reachLimit bool, opts ...ctlOption) {
|
|||||||
t.Log("Generating configuration for creating cluster.")
|
t.Log("Generating configuration for creating cluster.")
|
||||||
cx := getDefaultCtlCtx(t)
|
cx := getDefaultCtlCtx(t)
|
||||||
cx.applyOpts(opts)
|
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
|
// connect to different members, accordingly it's difficult to test the
|
||||||
// behavior.
|
// behavior.
|
||||||
cx.cfg.ClusterSize = 1
|
cx.cfg.ClusterSize = 1
|
||||||
@ -114,8 +114,8 @@ func testV3CurlMaxStream(t *testing.T, reachLimit bool, opts ...ctlOption) {
|
|||||||
submitConcurrentWatch(cx, int(concurrentNumber), &wg, errCh)
|
submitConcurrentWatch(cx, int(concurrentNumber), &wg, errCh)
|
||||||
submitRangeAfterConcurrentWatch(cx, expectedResponse)
|
submitRangeAfterConcurrentWatch(cx, expectedResponse)
|
||||||
|
|
||||||
// Step 4: check the watch errors. Note that we ony check the watch error
|
// Step 4: check the watch errors. Note that we only check the watch error
|
||||||
// before closing cluster. Once we closed the cluster, the watch must run
|
// before closing cluster. Once we close the cluster, the watch must run
|
||||||
// into error, and we should ignore them by then.
|
// into error, and we should ignore them by then.
|
||||||
t.Log("Checking watch error.")
|
t.Log("Checking watch error.")
|
||||||
select {
|
select {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user