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
When we have 2 requests (3-4) in the leader's RequestTable with last_applied=4 and commit_index=2, and the leader crashes and is restarted (or a new leader is started), then RequestTable needs to be populated with pending requests.
If this is not done, the new leader will start trying to commit pending entries 3 and 4 and when the AppendEntries responses are received, and the RequestTable is empty, we won't ever commit entries 3 and 4.
Solution: when becoming leader, populate RequestTable from the log: add entries in range [last_applied+1 .. commit_index].
The text was updated successfully, but these errors were encountered:
- RAFT: leader resends message if its own commit_index is < its last_applied (#30)
- RAFT: a new leader populates its RequestTable with all entries between commit_index+1 and last_applied (#31)
When we have 2 requests (3-4) in the leader's RequestTable with
last_applied=4
andcommit_index=2
, and the leader crashes and is restarted (or a new leader is started), thenRequestTable
needs to be populated with pending requests.If this is not done, the new leader will start trying to commit pending entries 3 and 4 and when the AppendEntries responses are received, and the RequestTable is empty, we won't ever commit entries 3 and 4.
Solution: when becoming leader, populate
RequestTable
from the log: add entries in range [last_applied+1 .. commit_index].The text was updated successfully, but these errors were encountered: