From 7d6ea82527dc543b9d1379782a7a7c8e494bbc64 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Wed, 22 Jan 2020 16:15:59 +0100 Subject: [PATCH] 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. --- agent/consul/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/consul/server.go b/agent/consul/server.go index 25e339ab7c..a3ce469282 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -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