You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to raft paper, leader can only commit the entries which are belong to current term. So in a sceniaro: leader n0 has appended entry-1 to n1 and n2, but before n0 commit the index-1, it has crashed. Now n1 became leader, but it can't commit the index-1 although more than half peers have stored the entry-1, and the index-1 will never be commited util a new entry is sent to leader for appending.
So we can let new leader append a no-op entry as soon as it becomes leader.When this no-op entry is replicated to more than half peers, leader will advance the commit index to this no-op entry's index.