mirror of https://github.com/hashicorp/consul
Stops scaling the commit timeout.
parent
679b3c0c6b
commit
2822334bce
|
@ -206,7 +206,6 @@ func TestAgent_CheckPerformanceSettings(t *testing.T) {
|
||||||
def := raft.DefaultConfig()
|
def := raft.DefaultConfig()
|
||||||
if r.HeartbeatTimeout != raftMult*def.HeartbeatTimeout ||
|
if r.HeartbeatTimeout != raftMult*def.HeartbeatTimeout ||
|
||||||
r.ElectionTimeout != raftMult*def.ElectionTimeout ||
|
r.ElectionTimeout != raftMult*def.ElectionTimeout ||
|
||||||
r.CommitTimeout != raftMult*def.CommitTimeout ||
|
|
||||||
r.LeaderLeaseTimeout != raftMult*def.LeaderLeaseTimeout {
|
r.LeaderLeaseTimeout != raftMult*def.LeaderLeaseTimeout {
|
||||||
t.Fatalf("bad: %#v", *r)
|
t.Fatalf("bad: %#v", *r)
|
||||||
}
|
}
|
||||||
|
@ -225,7 +224,6 @@ func TestAgent_CheckPerformanceSettings(t *testing.T) {
|
||||||
def := raft.DefaultConfig()
|
def := raft.DefaultConfig()
|
||||||
if r.HeartbeatTimeout != raftMult*def.HeartbeatTimeout ||
|
if r.HeartbeatTimeout != raftMult*def.HeartbeatTimeout ||
|
||||||
r.ElectionTimeout != raftMult*def.ElectionTimeout ||
|
r.ElectionTimeout != raftMult*def.ElectionTimeout ||
|
||||||
r.CommitTimeout != raftMult*def.CommitTimeout ||
|
|
||||||
r.LeaderLeaseTimeout != raftMult*def.LeaderLeaseTimeout {
|
r.LeaderLeaseTimeout != raftMult*def.LeaderLeaseTimeout {
|
||||||
t.Fatalf("bad: %#v", *r)
|
t.Fatalf("bad: %#v", *r)
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,7 @@ type DNSConfig struct {
|
||||||
// Performance is used to tune the performance of Consul's subsystems.
|
// Performance is used to tune the performance of Consul's subsystems.
|
||||||
type Performance struct {
|
type Performance struct {
|
||||||
// RaftMultiplier is an integer multiplier used to scale Raft timing
|
// RaftMultiplier is an integer multiplier used to scale Raft timing
|
||||||
// parameters: HeartbeatTimeout, ElectionTimeout, CommitTimeout, and
|
// parameters: HeartbeatTimeout, ElectionTimeout, and LeaderLeaseTimeout.
|
||||||
// LeaderLeaseTimeout.
|
|
||||||
RaftMultiplier uint `mapstructure:"raft_multiplier"`
|
RaftMultiplier uint `mapstructure:"raft_multiplier"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,6 @@ func (c *Config) ScaleRaft(raftMultRaw uint) {
|
||||||
def := raft.DefaultConfig()
|
def := raft.DefaultConfig()
|
||||||
c.RaftConfig.HeartbeatTimeout = raftMult * def.HeartbeatTimeout
|
c.RaftConfig.HeartbeatTimeout = raftMult * def.HeartbeatTimeout
|
||||||
c.RaftConfig.ElectionTimeout = raftMult * def.ElectionTimeout
|
c.RaftConfig.ElectionTimeout = raftMult * def.ElectionTimeout
|
||||||
c.RaftConfig.CommitTimeout = raftMult * def.CommitTimeout
|
|
||||||
c.RaftConfig.LeaderLeaseTimeout = raftMult * def.LeaderLeaseTimeout
|
c.RaftConfig.LeaderLeaseTimeout = raftMult * def.LeaderLeaseTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue