Browse Source

server: apply ents when loading log

Yicheng Qin 11 năm trước cách đây
mục cha
commit
ffa5eb08c3
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      etcd/participant.go

+ 1 - 0
etcd/participant.go

@@ -130,6 +130,7 @@ func newParticipant(id int64, pubAddr string, raftPubAddr string, dir string, cl
 		}
 		p.id = n.Id
 		p.node.Node = raft.Recover(n.Id, n.Ents, n.State, defaultHeartbeat, defaultElection)
+		p.apply(p.node.Next())
 		log.Printf("id=%x participant.load path=%s\n", p.id, walPath)
 	}
 	p.w = w