Closed kellabyte closed 11 years ago
The leader doesn't try to re-elect if followers are down. It'll wait until another another node tries to become a candidate.
Are you seeing the writes actually commit against the leader?
@benbjohnson @kellabyte There seems to be a problem. I will fix it soon.
@benbjohnson @kellabyte We need to sort the commitIndex of peers in descending order. Then we can pick the first majority one as the current CommitedIndex of the whole cluster. I will send a pr.
If you create a 2 node cluster and kill the follower process you can still issue writes to the leader. I would expect the leader once its discovered the follower is down to go back to trying to elect a new leader but can't because there's not enough nodes to elect one which would cause writes to fail.
I let it run for about 30 minutes and writes were still being accepted.
If you stop both nodes and only start the leader, the leader correctly rejects writes.