Turns of intent queue warnings and enables dynamic queue sizing.

pull/3731/head
James Phillips 2017-12-07 16:27:06 -08:00
parent bcc9aea18f
commit 5065f3d82e
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 17 additions and 2 deletions

View File

@ -376,6 +376,21 @@ func (c *Config) CheckACL() error {
return nil
}
// SerfDefaultConfig returns a Consul-flavored Serf default configuration,
// suitable as a basis for a LAN, WAN, segment, or area.
func SerfDefaultConfig() *serf.Config {
base := serf.DefaultConfig()
// This effectively disables the annoying queue depth warnings.
base.QueueDepthWarning = 1000000
// This enables dynamic sizing of the message queue depth based on the
// cluster size.
base.MinQueueDepth = 4096
return base
}
// DefaultConfig returns a sane default configuration.
func DefaultConfig() *Config {
hostname, err := os.Hostname()
@ -389,8 +404,8 @@ func DefaultConfig() *Config {
NodeName: hostname,
RPCAddr: DefaultRPCAddr,
RaftConfig: raft.DefaultConfig(),
SerfLANConfig: serf.DefaultConfig(),
SerfWANConfig: serf.DefaultConfig(),
SerfLANConfig: SerfDefaultConfig(),
SerfWANConfig: SerfDefaultConfig(),
SerfFloodInterval: 60 * time.Second,
ReconcileInterval: 60 * time.Second,
ProtocolVersion: ProtocolVersion2Compatible,