forked from etcd-io/etcd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]: https://github.com/cockroachdb/cockroach/blob/91b11dae416f3d9b55fadd2a4b096e94d874176c/pkg/storage/split_delay_helper.go#L138-L141
- Loading branch information
Showing
2 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
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
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