Browse Source

etcdserver: init snapi when init appliedi

Yicheng Qin 11 years ago
parent
commit
1b038da18a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      etcdserver/server.go

+ 1 - 0
etcdserver/server.go

@@ -418,6 +418,7 @@ func (s *EtcdServer) run() {
 				firsti := rd.CommittedEntries[0].Index
 				if appliedi == 0 {
 					appliedi = firsti - 1
+					snapi = appliedi
 				}
 				if firsti > appliedi+1 {
 					log.Panicf("etcdserver: first index of committed entry[%d] should <= appliedi[%d] + 1", firsti, appliedi)