Skip to content

Commit 4b26b6b

Browse files
committed
Set ConfState during Zero restart as well.
1 parent 4dabc3d commit 4b26b6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dgraph/cmd/zero/raft.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ func (n *node) initAndStartNode() error {
356356
sp, err := n.Store.Snapshot()
357357
x.Checkf(err, "Unable to get existing snapshot")
358358
if !raft.IsEmptySnap(sp) {
359+
// It is important that we pick up the conf state here.
360+
n.SetConfState(&sp.Metadata.ConfState)
361+
359362
var state intern.MembershipState
360363
x.Check(state.Unmarshal(sp.Data))
361364
n.server.SetMembershipState(&state)

0 commit comments

Comments
 (0)