Skip to content

Commit

Permalink
fix(raft): Unmarshal zero snapshot into pb.ZeroSnaphot
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.
  • Loading branch information
Ibrahim Jarif committed Jan 5, 2021
1 parent 5b04450 commit 16a676b
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 16a676b

Please sign in to comment.