Skip to content

Commit

Permalink
fix(raft): Unmarshal zero snapshot into pb.ZeroSnaphot (#7244)
Browse files Browse the repository at this point in the history
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 842bb3d)
  • Loading branch information
Ibrahim Jarif committed Jan 7, 2021
1 parent b36b486 commit 85dc5a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dgraph/cmd/zero/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 85dc5a3

Please sign in to comment.