Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. l The leader starts accepting connections from followers.
  2. f Followers connect the the leader and send SERVERINFO(lastZxid, info).
  3. l The leader sends SERVERINFO(lastZxid, info) to followers that connect.
  4. l Once the leader has quorum, it stops accepting connections, and sends NEWEPOCH(e) to all followers, where e is greater than all f.acceptedEpoch in the quorum.
  5. f Followers send ACK(e<<32) When the follower receives NEWEPOCH(e) it will do one of the following:
    • if e > f.acceptedEpoch
    . (If e < f.acceptedEpoch
    • , the
    follower will abandon the leader. If
    • the follower sets f.acceptedEpoch = e and sends ACK(e<<32);
    • if e == f.acceptedEpoch, the follower
    will
    • does not send ACK(e<<32), but
    will still maintain
    • continues to next step;
    • if e < f.acceptedEpoch, the follower closes the connection to the leader
    .)
    • and goes back to leader election;
  6. l The leader waits for all followers to ack NEWEPOCH(e)
  7. l If the following conditions are not met for all connected followers, the leader disconnects followers and goes back to leader election:
    • f.currentEpoch <= l.currentEpoch
    • if f.currentEpoch == l.currentEpoch, then f.lastZxid <= l.lastZxid

...