Skip to content

Commit

Permalink
Remove/add member on join request if sufferage has changed. Fixes #2532
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Nov 12, 2024
1 parent af146c2 commit 21adb22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/raft/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func (self *Controller) HandleAddPeerAsLeader(req *cmd_pb.AddPeerRequest) error
if srv.ID == id || srv.Address == addr {
// However, if *both* the ID and the address are the same, then nothing -- not even
// a join operation -- is needed.
if srv.ID == id && srv.Address == addr {
logrus.Infof("node %s at %s already member of cluster, ignoring join request", id, addr)
if srv.ID == id && srv.Address == addr && ((srv.Suffrage == raft.Voter) == req.IsVoter) {
logrus.Infof("node %s at %s already member of cluster matching request, ignoring join request", id, addr)
return nil
}

Expand Down

0 comments on commit 21adb22

Please sign in to comment.