Raft Fast Backup

Case 1 Case 2 Case 3
S1: 4 5 5 4 4 4 4
S2: 4 6 6 6 or 4 6 6 6 or 4 6 6 6
S2 is leader for term 6, S1 comes back to life, S2 sends AE for last 6
AE has prevLogTerm=6
rejection from S1 includes:
XTerm: term in the conflicting entry (if any)
XIndex: index of first entry with that term (if any)
XLen: log length
Case 1 (leader doesn’t have XTerm):
nextIndex = XIndex
Case 2 (leader has XTerm):
nextIndex = leader’s last entry for XTerm
Case 3 (follower’s log is too short):
nextIndex = XLen