mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
Clarifies a comment about no-op peer operations.
This commit is contained in:
parent
87c15d414d
commit
e3a01d9b7f
@ -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()
|
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
|
// 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()
|
configFuture := s.raft.GetConfiguration()
|
||||||
if err := configFuture.Error(); err != nil {
|
if err := configFuture.Error(); err != nil {
|
||||||
s.logger.Printf("[ERR] consul: failed to get raft configuration: %v", err)
|
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()
|
addr := (&net.TCPAddr{IP: m.Addr, Port: port}).String()
|
||||||
|
|
||||||
// See if it's already in the configuration. It's harmless to re-remove it
|
// 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()
|
configFuture := s.raft.GetConfiguration()
|
||||||
if err := configFuture.Error(); err != nil {
|
if err := configFuture.Error(); err != nil {
|
||||||
s.logger.Printf("[ERR] consul: failed to get raft configuration: %v", err)
|
s.logger.Printf("[ERR] consul: failed to get raft configuration: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user