goraft / raft

UNMAINTAINED: A Go implementation of the Raft distributed consensus protocol.
MIT License
2.43k stars 479 forks source link

Add back removed node #108

Closed xiang90 closed 10 years ago

xiang90 commented 11 years ago

Now when we remove a node, we will write an log entry. So if a node is removed, and then came back with the same name.

It will also be removed at the previous log entry. Or it will receive a snapshot, which does not contain itself in the conf.

To solve this, we probably need to let the removed node to send a join command and bypass the previous remove command.

The use case is that the application may want to remove a node if it does not reply to AE for minutes. But if the node recover later, we may still want it to join in.

@benbjohnson any ideas?

benbjohnson commented 11 years ago

@xiangli-cmu It seems like we could have the node continue to run but just prevent it from becoming a candidate or voting if it's not part of the cluster configuration. That way it can pick up changes when it re-joins. Would that work?

xiang90 commented 11 years ago

@benbjohnson I am trying to make it work in application layer. I dont want raft be complicated either. :) Let us see what happens.

benbjohnson commented 11 years ago

@xiangli-cmu We should prevent a node from promoting or voting if it's not a part of the cluster though. That's core Raft functionality.

xiang90 commented 11 years ago

@benbjohnson I will think about this more tomorrow.