{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/raft/issues/56","labels_url":"https://api.github.com/repos/hashicorp/raft/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/raft/issues/56/comments","events_url":"https://api.github.com/repos/hashicorp/raft/issues/56/events","html_url":"https://github.com/hashicorp/raft/issues/56","id":99253779,"number":56,"title":"raft.Snapshot() snapshots to 0 if there are no new log entries","user":{"login":"superfell","id":399098,"avatar_url":"https://avatars.githubusercontent.com/u/399098?v=3","gravatar_id":"","url":"https://api.github.com/users/superfell","html_url":"https://github.com/superfell","followers_url":"https://api.github.com/users/superfell/followers","following_url":"https://api.github.com/users/superfell/following{/other_user}","gists_url":"https://api.github.com/users/superfell/gists{/gist_id}","starred_url":"https://api.github.com/users/superfell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superfell/subscriptions","organizations_url":"https://api.github.com/users/superfell/orgs","repos_url":"https://api.github.com/users/superfell/repos","events_url":"https://api.github.com/users/superfell/events{/privacy}","received_events_url":"https://api.github.com/users/superfell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-05T17:12:19Z","updated_at":"2015-08-05T17:12:19Z","closed_at":null,"body":"I've noticed that under certain conditions if you force a snapshot to be created via the raft.Snapshot() it reports that its snapshot'd to 0, e.g.\r\n\r\n10:07:45 graphr3 | 2015/08/05 10:07:45 [INFO] raft: Starting snapshot up to 0\r\n10:07:45 graphr3 | 2015/08/05 10:07:45 [INFO] snapshot: Creating new snapshot at /media/data/code/graphr/data/3/snapshots/0-0-1438794465718.tmp\r\n10:07:45 graphr3 | 2015/08/05 10:07:45 [INFO] snapshot: reaping snapshot /media/data/code/graphr/data/3/snapshots/0-0-1438794465718\r\n10:07:45 graphr3 | 2015/08/05 10:07:45 [INFO] raft: Compacting logs from 385002 to 0\r\n10:07:45 graphr3 | 2015/08/05 10:07:45 [INFO] raft: Snapshot to 0 complete\r\n\r\nThe easiest way to reproduce this is to start a node, force a snapshot, stop the node, restart it, and then force a snapshot again. It seems like something doesn't get initialized until a new log entry has been created."}}