This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestRaftSnapshotTrailingLogs(t *testing.T) { | |
// Make the cluster | |
conf := inmemConfig(t) | |
// Don't keep any log entries after snapshot | |
conf.TrailingLogs = 0 | |
c := MakeCluster(1, t, conf) | |
defer c.Close() | |
// Commit a lot of things | |
leader := c.Leader() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== RUN TestRaftSnapshotRestoreOld | |
2016/02/13 12:38:35 [INFO] raft: Node at d75fd391-50c0-8c2f-2e7c-944bc53d89c6 [Follower] entering Follower state | |
2016/02/13 12:38:35 [WARN] raft: Heartbeat timeout reached, starting election | |
2016/02/13 12:38:35 [INFO] raft: Node at d75fd391-50c0-8c2f-2e7c-944bc53d89c6 [Candidate] entering Candidate state | |
2016/02/13 12:38:35 [DEBUG] raft: Votes needed: 1 | |
2016/02/13 12:38:35 [DEBUG] raft: Vote granted from d75fd391-50c0-8c2f-2e7c-944bc53d89c6. Tally: 1 | |
2016/02/13 12:38:35 [INFO] raft: Election won. Tally: 1 | |
2016/02/13 12:38:35 [INFO] raft: Node at d75fd391-50c0-8c2f-2e7c-944bc53d89c6 [Leader] entering Leader state | |
2016/02/13 12:38:35 [DEBUG] raft: Node d75fd391-50c0-8c2f-2e7c-944bc53d89c6 updated peer set (2): [d75fd391-50c0-8c2f-2e7c-944bc53d89c6] | |
2016/02/13 12:38:35 [INFO] raft: Starting snapshot up to 101 |