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

Add external state support #18

Merged
merged 4 commits into from
Jul 12, 2017
Merged

Add external state support #18

merged 4 commits into from
Jul 12, 2017

Commits on Jul 7, 2017

  1. Add external state support

    Add support for external state (log) to influence leader voting. This,
    in effect, implements lastLogIndex and lastLogTerm sent on RequestVote
    RPCs from the Raft paper. This works by exposing two callbacks: one that
    calls into the user on RequestVote to get the candidate's state and one
    that calls into the user upon receiving a RequestVote to determine if a
    vote should be granted based on comparing the logs.
    
    From Raft:
    1. Reply false if term < currentTerm (§5.1)
    2. If votedFor is null or candidateId, and candidate’s log is at
    least as up-to-date as receiver’s log, grant vote (§5.2, §5.4)
    tylertreat committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    191f6be View commit details
    Browse the repository at this point in the history
  2. Update copyrights

    tylertreat committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    433585a View commit details
    Browse the repository at this point in the history
  3. Fix comment in test

    tylertreat committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    23bf473 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2017

  1. Configuration menu
    Copy the full SHA
    6692c9d View commit details
    Browse the repository at this point in the history