Skip to content

Commit

Permalink
Default Raft election timeout to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed May 12, 2015
1 parent cb4d906 commit d7152ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion etc/config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ max-segment-size = 10485760
# Raft configuration. Controls the distributed consensus system.
[raft]
apply-interval = "10ms"
election-timeout = "1s"
election-timeout = "5s"
heartbeat-interval = "100ms"
reconnect-timeout = "10ms"

Expand Down
2 changes: 1 addition & 1 deletion raft/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
DefaultApplyInterval = 10 * time.Millisecond

// DefaultElectionTimeout is the default time before starting an election.
DefaultElectionTimeout = 1 * time.Second
DefaultElectionTimeout = 5 * time.Second

// DefaultHeartbeatInterval is the default time to wait between heartbeats.
DefaultHeartbeatInterval = 100 * time.Millisecond
Expand Down

0 comments on commit d7152ac

Please sign in to comment.