etcd-team/etcd — pull request #14 by unihorn (2014-07-31 22:31:45+00:00)
Title: Snap compact and recovery

1. Add glue code for log compaction and snapshot

2. Add glue code for recovering from snapshot

3. Store snapshot inside raft package and remove snapshoter interface

4. Fix promotion problem introduced by snapshot recovery.
Follower should not promote itself to candidate if it has not been added into the cluster. The previous promotion check is not strong enough anymore. Previously, the first batch of entries contains the node add entry(the one that contain the follower node). Now the first snapshot recovery might not contain the node add entry.