From e3a01d9b7f1eb7539fdd80421df69f6024d3587b Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 29 Jul 2016 09:27:15 -0700 Subject: [PATCH] Clarifies a comment about no-op peer operations. --- consul/leader.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/consul/leader.go b/consul/leader.go index 0d4b8c4f42..375b01ae5c 100644 --- a/consul/leader.go +++ b/consul/leader.go @@ -547,7 +547,8 @@ func (s *Server) joinConsulServer(m serf.Member, parts *agent.Server) error { addr := (&net.TCPAddr{IP: m.Addr, Port: parts.Port}).String() // See if it's already in the configuration. It's harmless to re-add it - // but we want to avoid doing that if possible. + // but we want to avoid doing that if possible to prevent useless Raft + // log entries. configFuture := s.raft.GetConfiguration() if err := configFuture.Error(); err != nil { s.logger.Printf("[ERR] consul: failed to get raft configuration: %v", err) @@ -574,7 +575,8 @@ func (s *Server) removeConsulServer(m serf.Member, port int) error { addr := (&net.TCPAddr{IP: m.Addr, Port: port}).String() // See if it's already in the configuration. It's harmless to re-remove it - // but we want to avoid doing that if possible. + // but we want to avoid doing that if possible to prevent useless Raft + // log entries. configFuture := s.raft.GetConfiguration() if err := configFuture.Error(); err != nil { s.logger.Printf("[ERR] consul: failed to get raft configuration: %v", err)