mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2261 from yichengq/322
migrate: fix setting commit index from snapshot
This commit is contained in:
commit
d74e74d320
@ -103,7 +103,7 @@ func Migrate4To2(dataDir string, name string) error {
|
||||
st2 := cfg4.HardState2()
|
||||
|
||||
// If we've got the most recent snapshot, we can use it's committed index. Still likely less than the current actual index, but worth it for the replay.
|
||||
if snap2 != nil {
|
||||
if snap2 != nil && st2.Commit < snap2.Metadata.Index {
|
||||
st2.Commit = snap2.Metadata.Index
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user