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