Skip to content

Commit

Permalink
(release/v20.07) Update nextRaftId when starting a node with a raftId…
Browse files Browse the repository at this point in the history
… > 0. (#6597)


(cherry picked from commit a4f21f4)
  • Loading branch information
martinmr authored Oct 4, 2020
1 parent 483d3ff commit 0f2807b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dgraph/cmd/zero/zero.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ func (s *Server) Connect(ctx context.Context,
m.Id = s.nextRaftId
s.nextRaftId += 1
proposal.MaxRaftId = m.Id
} else if m.Id >= s.nextRaftId {
s.nextRaftId = m.Id + 1
proposal.MaxRaftId = m.Id
}

// We don't have this member. So, let's see if it has preference for a group.
Expand Down

0 comments on commit 0f2807b

Please sign in to comment.