Browse Source

Merge pull request #6878 from absolute8511/fix-raftexample-test

raftexample: confState should be saved after apply
Xiang Li 9 years ago
parent
commit
69470b5e5f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contrib/raftexample/raft.go

+ 1 - 1
contrib/raftexample/raft.go

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