server: apply ents when loading log

This commit is contained in:
Yicheng Qin 2014-07-28 16:02:56 -07:00
parent a6132d459f
commit ffa5eb08c3

View File

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