akka-raft
akka-raft copied to clipboard
Log compaction can cause append to take too many entries
The call to ReplicatedLog.append in the Follower's append code does not take log compaction into account. If a log has been compacted, then taking a number of entries equal to the log index and appending the new entries to that will leave too many extra entries in the log (because the number of entries is not equal to the index of the last log entry in this case).