Package io.atomix.raft.impl
Class ReconfigurationHelper
java.lang.Object
io.atomix.raft.impl.ReconfigurationHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanoint()Attempts to become the leader.forceConfigure(Map<MemberId, RaftMember.Type> newMembersIds) Force configuration works as follows.join(Collection<MemberId> clusterMembers) leave()
-
Constructor Details
-
ReconfigurationHelper
-
-
Method Details
-
join
-
leave
-
forceConfigure
Force configuration works as follows. Assume current members are 0,1,3,4, and we want to force remove 2 and 3.External Raft 0 (follower) Raft 1 (follower) Raft 2/3 | | | (Members to be removed) | forceConfigure([0,1]) | | | |-------------------------------->| | | | | | | | Configuration={ | | | | newMembers=[0,1],| | | | oldMembers=[] | | | | force=TRUE | | | | Commit new config | ForceConfigureRequest(newMembers) | | | |------------------------------------>| | | | OK |Commit new Configuration | | OK |invalid input: '<'------------------------------------| | |invalid input: '<'--------------------------------| | Poll/Vote/Append | | | |invalid input: '<'-----------------------------------| | election | poll/vote |----------------------------------->| | timeout ------------------------------------->| Reject because Force==TRUE | | | OK | | | |invalid input: '<'------------------------------------| | | Become leader| | | | | | | | Append InitialEntry | | | | Append ConfigurationEntry | | | | Configuration={ | AppendEntry | | | newMembers=[0,1] |------------------------------------>| | | force=FALSE |invalid input: '<'------------------------------------| | | } | | | | |------------------------------------>| | | |invalid input: '<'------------------------------------| | | | | | | Commit new config| AppendEntry |On commitIndex update | | |------------------------------------>|Commit new config | | | | | | | | Poll/Vote | | | |invalid input: '<'-----------------------------------| | | | Reject because log not uptodate | | | |----------------------------------->| | | | | -
anoint
Attempts to become the leader.
-