etcdserver: add --max-request-bytes flag
This commit is contained in:
@ -61,6 +61,8 @@ const (
|
||||
basePort = 21000
|
||||
UrlScheme = "unix"
|
||||
UrlSchemeTLS = "unixs"
|
||||
|
||||
defaultMaxRequestSize
|
||||
)
|
||||
|
||||
var (
|
||||
@ -95,6 +97,7 @@ type ClusterConfig struct {
|
||||
UseGRPC bool
|
||||
QuotaBackendBytes int64
|
||||
MaxTxnOps uint
|
||||
MaxRequestBytes uint
|
||||
}
|
||||
|
||||
type cluster struct {
|
||||
@ -227,6 +230,7 @@ func (c *cluster) mustNewMember(t *testing.T) *member {
|
||||
clientTLS: c.cfg.ClientTLS,
|
||||
quotaBackendBytes: c.cfg.QuotaBackendBytes,
|
||||
maxTxnOps: c.cfg.MaxTxnOps,
|
||||
maxRequestBytes: c.cfg.MaxRequestBytes,
|
||||
})
|
||||
m.DiscoveryURL = c.cfg.DiscoveryURL
|
||||
if c.cfg.UseGRPC {
|
||||
@ -494,6 +498,7 @@ type memberConfig struct {
|
||||
clientTLS *transport.TLSInfo
|
||||
quotaBackendBytes int64
|
||||
maxTxnOps uint
|
||||
maxRequestBytes uint
|
||||
}
|
||||
|
||||
// mustNewMember return an inited member with the given name. If peerTLS is
|
||||
@ -545,6 +550,10 @@ func mustNewMember(t *testing.T, mcfg memberConfig) *member {
|
||||
if m.MaxTxnOps == 0 {
|
||||
m.MaxTxnOps = embed.DefaultMaxTxnOps
|
||||
}
|
||||
m.MaxRequestBytes = mcfg.maxRequestBytes
|
||||
if m.MaxRequestBytes == 0 {
|
||||
m.MaxRequestBytes = embed.DefaultMaxRequestBytes
|
||||
}
|
||||
m.AuthToken = "simple" // for the purpose of integration testing, simple token is enough
|
||||
return m
|
||||
}
|
||||
|
Reference in New Issue
Block a user