Skip to content

Commit

Permalink
Increase raft notify buffer.
Browse files Browse the repository at this point in the history
Fixes #6852.

Increasing the buffer helps recovering from leader flapping. It lowers
the chances of the flapping leader to get into a deadlock situation like
described in #6852.

* [ ] test in an actual cluster
  • Loading branch information
hanshasselberg committed Dec 2, 2019
1 parent aed5cb7 commit 372536f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/consul/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ func (s *Server) setupRaft() error {
}

// Set up a channel for reliable leader notifications.
raftNotifyCh := make(chan bool, 1)
raftNotifyCh := make(chan bool, 1000)
s.config.RaftConfig.NotifyCh = raftNotifyCh
s.raftNotifyCh = raftNotifyCh

Expand Down

0 comments on commit 372536f

Please sign in to comment.