23 Raft AppendEntries
Conflict inAppendEntries
- Conflicting entries can exist.
- different leaders append, 1 leader crash b4 replicating entries fully, later another leader elected
- Only 1 of those entries can be actually committed
- Only when stored in majority & in the log of current leader
- Reconciliation mechanism
- If follower's log doesn't match, delete and replace, and Append any new entries not already in the log
2 Servers think they're leader at same time

that's fine. Term 1 cannot commit (since never will be majority), when they get back, they follow Term 2's log
Commit Entry from Previous Terms
If there exists an N such that N > commitIndex, a majority of matchIndex[i] ≥ N, and log[N].term == currentTerm: set commitIndex = N.
You can only commit entry that belongs to your term.
