etcdserver: init snapi when init appliedi

release-2.0
Yicheng Qin 2014-11-24 21:19:30 -08:00
parent bd9e93eeea
commit 1b038da18a
1 changed files with 1 additions and 0 deletions

View File

@ -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)