raft: return offset for unstableEnts

This commit is contained in:
Yicheng Qin
2014-07-25 12:03:03 -07:00
parent 311db876b0
commit e850c644da
3 changed files with 16 additions and 7 deletions

View File

@@ -206,7 +206,8 @@ func (n *Node) UpdateConf(t int64, c *Config) {
}
// UnstableEnts retuens all the entries that need to be persistent.
func (n *Node) UnstableEnts() []Entry {
// The first return value is offset, and the second one is unstable entries.
func (n *Node) UnstableEnts() (int64, []Entry) {
return n.sm.raftLog.unstableEnts()
}