raft: increase raft notify buffer. (#6863)

* Increase raft notify buffer.

Fixes https://github.com/hashicorp/consul/issues/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.
This commit is contained in:
Hans Hasselberg 2020-01-22 16:15:59 +01:00 committed by GitHub
parent e00effa325
commit 5379cf7c67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -725,7 +725,7 @@ func (s *Server) setupRaft() error {
}
// Set up a channel for reliable leader notifications.
raftNotifyCh := make(chan bool, 1)
raftNotifyCh := make(chan bool, 10)
s.config.RaftConfig.NotifyCh = raftNotifyCh
s.raftNotifyCh = raftNotifyCh