mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: check recovery error when new server
This commit is contained in:
parent
8c338ffcc7
commit
71f3b80fbe
@ -272,7 +272,9 @@ func NewServer(cfg *ServerConfig) (*EtcdServer, error) {
|
||||
return nil, err
|
||||
}
|
||||
if snapshot != nil {
|
||||
st.Recovery(snapshot.Data)
|
||||
if err := st.Recovery(snapshot.Data); err != nil {
|
||||
log.Panicf("etcdserver: recovered store from snapshot error: %v", err)
|
||||
}
|
||||
log.Printf("etcdserver: recovered store from snapshot at index %d", snapshot.Metadata.Index)
|
||||
index = snapshot.Metadata.Index
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user