Stops scaling the commit timeout.

This commit is contained in:
James Phillips 2016-08-25 15:05:40 -07:00
parent 679b3c0c6b
commit 2822334bce
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
3 changed files with 1 additions and 5 deletions

View File

@ -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)
}

View File

@ -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"`
}

View File

@ -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
}