Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
2509
Description
Let's say we have a Follower with 5 applied entries in it's in-memory journal and a snapshot is triggered on the Follower. With the current logic the in-memory journal will be emptied and all the 5 entries will be put into the snapshot.
If the Leader was to send this Follower a 6th entry the follower will respond with a failure because it will not be able to get to the 5th entry and verify that the term in the 5th entry matches the prevLogTerm of the Leader.
To fix this problem snapshotting should never clear all the entries from the in-memory journal. Atleast one (or more) entries need to be left there so that a more efficient previous entry comparison can be done.