-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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 #7628
- Loading branch information
Showing
2 changed files
with
36 additions
and
13 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