Explorar o código

etcdserver: correct the log about recovering from snapshot

Yicheng Qin %!s(int64=11) %!d(string=hai) anos
pai
achega
8c338ffcc7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      etcdserver/server.go

+ 2 - 2
etcdserver/server.go

@@ -272,14 +272,14 @@ func NewServer(cfg *ServerConfig) (*EtcdServer, error) {
 			return nil, err
 			return nil, err
 		}
 		}
 		if snapshot != nil {
 		if snapshot != nil {
-			log.Printf("etcdserver: recovering from snapshot at index %d", snapshot.Metadata.Index)
 			st.Recovery(snapshot.Data)
 			st.Recovery(snapshot.Data)
+			log.Printf("etcdserver: recovered store from snapshot at index %d", snapshot.Metadata.Index)
 			index = snapshot.Metadata.Index
 			index = snapshot.Metadata.Index
 		}
 		}
 		cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st)
 		cfg.Cluster = NewClusterFromStore(cfg.Cluster.token, st)
 		cfg.Print()
 		cfg.Print()
 		if snapshot != nil {
 		if snapshot != nil {
-			log.Printf("etcdserver: loaded peers from snapshot: %s", cfg.Cluster)
+			log.Printf("etcdserver: loaded cluster information from store: %s", cfg.Cluster)
 		}
 		}
 		if !cfg.ForceNewCluster {
 		if !cfg.ForceNewCluster {
 			id, n, s, w = restartNode(cfg, index+1, snapshot)
 			id, n, s, w = restartNode(cfg, index+1, snapshot)