mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
contrib/raftexample: Publish only committed entries
We shouldn't publish entries to the kvstore until they've been committed.
This commit is contained in:
parent
8f3e17b781
commit
a31f9a8af1
@ -228,7 +228,7 @@ func (rc *raftNode) serveChannels() {
|
||||
rc.wal.Save(rd.HardState, rd.Entries)
|
||||
rc.raftStorage.Append(rd.Entries)
|
||||
rc.transport.Send(rd.Messages)
|
||||
if ok := rc.publishEntries(rd.Entries); !ok {
|
||||
if ok := rc.publishEntries(rd.CommittedEntries); !ok {
|
||||
rc.stop()
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user