8 Commits

Author SHA1 Message Date
Tobias Schottdorf
bfaae1ba46 raft: enter ProgressStateReplica immediately after snapshot
When a follower requires a snapshot and the snapshot is sent at the
committed (and last) index in an otherwise idle Raft group, the follower
would previously remain in ProgressStateProbe even though it had been
caught up completely.

In a busy Raft group this wouldn't be an issue since the next round of
MsgApp would update the state, but in an idle group there's nothing
that rectifies the status (since there's nothing to append or update).

The reason this matters is that the state is exposed through
`RaftStatus()`. Concretely, in CockroachDB, we use the Raft status to
make sharding decisions (since it's dangerous to make rapid changes
to a fragile Raft group), and had to work around this problem[1].

[1]: 91b11dae41/pkg/storage/split_delay_helper.go (L138-L141)
2018-12-06 11:09:59 +01:00
Gyuho Lee
bb60f8ab1d raft: change import paths to "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:52 -07:00
Jia Zhan
d14b705355 raft: fix a few comments 2018-04-27 11:25:06 -07:00
Gyu-Ho Lee
fe884f8209 raft: update LICENSE header 2016-05-12 20:49:15 -07:00
Gyu-Ho Lee
c09f23c46d *: clean up bool comparison 2016-04-02 18:27:54 -07:00
Xiang Li
d9b5b56c82 raft: make raft configurable 2015-03-23 09:55:19 -07:00
Yicheng Qin
67194c0b22 raft: introduce progress states 2015-03-18 08:16:32 -07:00
Xiang Li
9b4d52ee73 raft: do not resend snapshot if not necessary
raft relies on the link layer to report the status of the sent snapshot.
If the snapshot is still sending, the replication to that remote peer will
be paused. If the snapshot finish sending, the replication will begin
optimistically after electionTimeout. If the snapshot fails, raft will
try to resend it.
2015-02-28 11:41:58 -08:00