Skip to content

Commit

Permalink
Merge pull request #32601 from nvanbenschoten/backport2.0-31568
Browse files Browse the repository at this point in the history
release-2.0: storage: re-enqueue Raft groups on paginated application
  • Loading branch information
nvanbenschoten authored Nov 26, 2018
2 parents 2fdb530 + f4008d6 commit cf5093e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/storage/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -3837,6 +3837,14 @@ func (r *Replica) handleRaftReadyRaftMuLocked(
const expl = "during advance"
if err := r.withRaftGroup(func(raftGroup *raft.RawNode) (bool, error) {
raftGroup.Advance(rd)

// If the Raft group still has more to process then we immediately
// re-enqueue it for another round of processing. This is possible if
// the group's committed entries were paginated due to size limitations
// and we didn't apply all of them in this pass.
if raftGroup.HasReady() {
r.store.enqueueRaftUpdateCheck(r.RangeID)
}
return true, nil
}); err != nil {
return stats, expl, errors.Wrap(err, expl)
Expand Down

0 comments on commit cf5093e

Please sign in to comment.