libraft
libraft copied to clipboard
Send new AppendEntries with updated prefix immediately on receiving an unapplied AppendEntriesReply
Right now, when we receive a negative AppendEntriesReply, we simply modify the server's nextIndex and wait until the heartbeat timeout to send the next AppendEntries message with the updated prefix. This is one of the causes of #13 because, combined with the long KayVee heartbeat interval and the 7000-message backlog, the follower is not being caught up fast enough. A way to mitigate (but not completely solve) this problem would be to send out a new AppendEntries with the updated prefix immediately on receiving a NACK.
Note: Many of the tests are sensitive to message order, so they will have to be modified.