mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: add node.Unstable
Be able to return all unstable log entries. Application must store unstable log entries before send out any messages after calling step.
This commit is contained in:
@@ -204,3 +204,8 @@ func (n *Node) UpdateConf(t int64, c *Config) {
|
||||
}
|
||||
n.propose(t, data)
|
||||
}
|
||||
|
||||
// UnstableEnts retuens all the entries that need to be persistent.
|
||||
func (n *Node) UnstableEnts() []Entry {
|
||||
return n.sm.raftLog.unstableEnts()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user