Can an agent's log be cleared when removed under these assumptions?

32 views
Skip to first unread message

Alex Goltman

unread,
Jul 5, 2017, 10:00:35 AM7/5/17
to raft-dev
Hi,

In our system we have the following setup and assumptions:
  1. A centralised configuration which dictates on which hosts raft agents should be spawned - i.e. a host spawns a raft agent only when it sees itself in the configuration as a current member.
  2. The configuration is propagated to all of the hosts. Once a host gets a configuration update it's assured to never go back to an earlier version.
  3. The configuration holds the initial members (i.e. term 0), so whenever a raft agent is spawned it starts with the same initial state machine.
  4. Membership changes are always replacements - i.e. removing a host and adding another one instead.
  5. When a membership change is required the hosts to add and remove are written in the configuration. The raft leader then sees the new membership and executes the membership change. When a membership change is reported as done by the raft leader, the configuration is updated to reflect the new final membership.
  6. A host may be removed and later re-added.
  7. Once a host sees in the configuration it's no longer in the raft members - it stops its raft agent.
Assuming the above, I have the following independent questions:
  1. Can an agent's log be deleted form the host when it stops its agent? 
  2. Can we get rid of the the very initial members (term 0) in the configuration, and spawn agents with the current members in the configuration as the initial state machine?
I tried to think of scenarios which would lead to a split brain, but so far the assumptions seem to prevent such a case.
Can you help me find a loophole or otherwise prove it would work?

Thanks,
Alex
Reply all
Reply to author
Forward
0 new messages