Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: add option in function change_membership, turn not exist member into learner, or remove it #148

Merged
merged 11 commits into from
Feb 10, 2022

Conversation

lichuang
Copy link
Contributor

@lichuang lichuang commented Jan 25, 2022

  1. Refactor: add option in function change_membership, turn not exist member into learner, or remove it.
  2. add change_with_turn_not_exist_member_to_learner unit test.

@drmingdrmer
Copy link
Member

Maybe the final Membership can be calculated at the very first place: when RaftCore::change_membership() or RaftCore::add_learner() is called.

To be more specific, maybe we should extend Membership::next_safe() to build a new Membership that turns the removed member into a learner or not.

openraft/src/raft.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants