Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: apply preemptive snaps under a real replicaID
As of recenly, Raft [checks] that a peer receiving a snapshot is actually contained in the configuration of a snapshot. Preemptive snapshots were failing that check because we applied them via a temporary Raft group that had ID MaxUint64. Preemptive snapshots are already a lie, so until we get rid of them completely we'll have to lie a little more and use an ID that is actually in the config. Any ID from the config will do; we take that of the sending replica. Additionally, we're a little more careful than previously to not leak anything about this temporary Raft group to the outside world - previously we allowed it to send messages. This was always a bad idea, but under a real ID this would be outright byzantine. [checks]: https://github.com/etcd-io/etcd/blob/aa158f36b9832038a38f611d075264acb3874c8c/raft/raft.go#L1357-L1362 Release note: None
- Loading branch information