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

raft: allow voter to become learner through snapshot #10864

Merged
merged 1 commit into from
Jul 11, 2019

Commits on Jul 8, 2019

  1. raft: allow voter to become learner through snapshot

    At the time of writing, we don't allow configuration changes to change
    voters to learners directly, but note that a snapshot may compress
    multiple changes to the configuration into one: the voter could have
    been removed, then readded as a learner and the snapshot reflects both
    changes. In that case, a voter receives a snapshot telling it that it is
    now a learner. In fact, the node has to accept that snapshot, or it is
    permanently cut off from the Raft log.
    
    I think this just wasn't realized in the original work, but this is just
    my guess since there generally is very little rationale on the various
    decisions made. I also generally haven't been able to figure out whether
    the decision to prevent voters from becoming learners without first
    having been removed was motivated by some particular concern, or if it
    just wasn't deemed necessary. I suspect it is the latter because
    demoting a voter seems perfectly safe.
    
    See etcd-io#8751 (comment).
    tbg committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    6f009d2 View commit details
    Browse the repository at this point in the history