From 16a676b5d596d33301d785fe0804b04028d29d7b Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Tue, 5 Jan 2021 16:31:46 +0530 Subject: [PATCH] fix(raft): Unmarshal zero snapshot into pb.ZeroSnaphot We recently made a change to how we store snapshots and it looks like we forgot to change that at one place. --- dgraph/cmd/zero/raft.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dgraph/cmd/zero/raft.go b/dgraph/cmd/zero/raft.go index ba55fbd4217..bd22e0c554b 100644 --- a/dgraph/cmd/zero/raft.go +++ b/dgraph/cmd/zero/raft.go @@ -862,9 +862,9 @@ func (n *node) Run() { } if !raft.IsEmptySnap(rd.Snapshot) { - var state pb.MembershipState - x.Check(state.Unmarshal(rd.Snapshot.Data)) - n.server.SetMembershipState(&state) + var zs pb.ZeroSnapshot + x.Check(zs.Unmarshal(rd.Snapshot.Data)) + n.server.SetMembershipState(zs.State) } for _, entry := range rd.CommittedEntries {