From 85dc5a3e445159bce683afb0e90cdaa6c4c86458 Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Wed, 6 Jan 2021 14:40:49 +0530 Subject: [PATCH] fix(raft): Unmarshal zero snapshot into pb.ZeroSnaphot (#7244) We recently made a change to how we store snapshots and it looks like we forgot to change that at one place. (cherry picked from commit 842bb3d8858f0045b2a1f46d0d60d974850fb0ee) --- 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 {