Closed sjpotter closed 3 years ago
other thoughts, this code as is (probably) buggy, as modifies node list while iterating. PR is mostly as a POC to point out what I'm trying to accomplish. make sure (as much as possible) that remove log entry is commited to removed node.
currently, the leader removes the node from its list of nodes as soon as it commits its own log entry.
what this means, is that the removed node will never commit the log entry of removal. this seems wrong to me.
I've modified the code to mark the node removed on commit to leader, but only actually remove the node after appendentries_all (i.e. with updated commit idx) is sent succesfully to the node
It's possible, that this is problematic. i.e. what happens if node is dead (so can't send message). open to better logic for determining when to remvoe node