Skip to content

Commit 16a676b

Browse files
author
Ibrahim Jarif
committed
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.
1 parent 5b04450 commit 16a676b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dgraph/cmd/zero/raft.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -862,9 +862,9 @@ func (n *node) Run() {
862862
}
863863

864864
if !raft.IsEmptySnap(rd.Snapshot) {
865-
var state pb.MembershipState
866-
x.Check(state.Unmarshal(rd.Snapshot.Data))
867-
n.server.SetMembershipState(&state)
865+
var zs pb.ZeroSnapshot
866+
x.Check(zs.Unmarshal(rd.Snapshot.Data))
867+
n.server.SetMembershipState(zs.State)
868868
}
869869

870870
for _, entry := range rd.CommittedEntries {

0 commit comments

Comments
 (0)