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

Allow only specific actors defined as a sticky leader to become a leader #186

Merged
merged 29 commits into from
Nov 18, 2022

Conversation

ydash
Copy link
Contributor

@ydash ydash commented Nov 7, 2022

Allow only specific actors defined as a sticky leader to become a leader when RaftSettings.stickyLeaders is not empty.

  • add API of withStickyLeaders
  • add following features to Follower.scala and Candidate.scala
    • if stickyLeaders is not empty, only raft actors defined as a sticky leader can become Leader
    • if stickyLeaders is empty, all raft actors can become Leader
  • add following feature to RaftActor.scala
    • notice warn log when creation of raft actor if stickyLeaders is not empty

@ydash ydash marked this pull request as ready for review November 7, 2022 10:43
@ydash ydash force-pushed the allow-only-specific-actors-to-become-leader branch from 03ea708 to d99c78b Compare November 17, 2022 08:34
Copy link
Contributor

@negokaz negokaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! LGTM 👍

@negokaz negokaz enabled auto-merge November 18, 2022 08:43
@negokaz negokaz merged commit 9859fb9 into master Nov 18, 2022
@negokaz negokaz deleted the allow-only-specific-actors-to-become-leader branch November 18, 2022 08:44
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.

3 participants