Clarifies a comment about no-op peer operations.

This commit is contained in:
James Phillips 2016-07-29 09:27:15 -07:00 committed by James Phillips
parent 87c15d414d
commit e3a01d9b7f
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 4 additions and 2 deletions

View File

@ -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)