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
I can't think of a scenario where commitIndex will be set to len(cm.log)-1), since the AE call from leader will always set the args.Entries from nextIndex[peerId] to the end of leader's logentries := cm.log[ni:], doesn't this ensure follower's log always be as complete as leader's?
so we can always set follower's commitIndex to args.LeaderCommit?
Am I crazy here?
The text was updated successfully, but these errors were encountered:
In part 2,
AppendEntries
method, this if blockI can't think of a scenario where
commitIndex
will be set tolen(cm.log)-1)
, since the AE call from leader will always set theargs.Entries
fromnextIndex[peerId]
to the end of leader'slog
entries := cm.log[ni:]
, doesn't this ensure follower's log always be as complete as leader's?so we can always set follower's
commitIndex
toargs.LeaderCommit
?Am I crazy here?
The text was updated successfully, but these errors were encountered: