coreos/etcd — pull request #1075 by xiangli-cmu (2014-09-14 06:32:11+00:00)
Title: raft: fix heartbeat

heartbeat should be the same as normal message append with previous index equal to next -1.
heartbeat should always be accepted by a synced follower.

if previous index is smaller than the log offset (which due to snapshot), we can just send a heartbeat with log offset. It will cause a rejection from the unsynced follower. After receiving the rejection, the leader will send a snapshot.