mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raftexample: confState should be saved after apply
This commit is contained in:
parent
377f19b003
commit
e8d06d8e4d
@ -155,7 +155,7 @@ func (rc *raftNode) publishEntries(ents []raftpb.Entry) bool {
|
||||
case raftpb.EntryConfChange:
|
||||
var cc raftpb.ConfChange
|
||||
cc.Unmarshal(ents[i].Data)
|
||||
rc.node.ApplyConfChange(cc)
|
||||
rc.confState = *rc.node.ApplyConfChange(cc)
|
||||
switch cc.Type {
|
||||
case raftpb.ConfChangeAddNode:
|
||||
if len(cc.Context) > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user