Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etcdserver: renames xxx.snap.db to db in NewServer()
In the case that follower recieves a snapshot from leader and crashes before renaming xxx.snap.db to db, restarting follower results loading old db. This will causes a index mismatch between snap metadata index and consistent index from db. The pr fixes the above on init of etcdserver through: 1. check if xxx.snap.db (xxx==snapshot.Metadata.Index) exists. 2. rename xxx.snap.db to db if exists. 3. load backend again with the new db file. FIXES etcd-io#7628
- Loading branch information