Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve the Raft snapshotting optimization #15062
If there is at least one follower with unknown match index, its log can
If there is at least one follower with unknown match index, its log can be close to the leader's log so we are keeping the old log entries. Otherwise, we will keep the log entries until the minimum match index that is bigger than (commitIndex - maxNumberOfLogsToKeepAfterSnapshot). If there is no such follower (all of the minority followers are far behind), then there is no need to keep the old log entries.