Skip to content

Commit

Permalink
If it is a delta update, do NOT run the limiter. Previous PR got that…
Browse files Browse the repository at this point in the history
… wrong.
  • Loading branch information
manishrjain committed May 2, 2019
1 parent 0930157 commit b47986a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion worker/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ func (n *node) proposeAndWait(ctx context.Context, proposal *pb.Proposal) error
for i := 0; i < 3; i++ {
// Each retry creates a new proposal, which adds to the number of pending proposals. We
// should consider this into account, when adding new proposals to the system.
if proposal.Delta != nil {
switch {
case proposal.Delta != nil: // Is a delta.
// If a proposal is important (like delta updates), let's not run it via the limiter
// below. We should always propose it irrespective of how many pending proposals there
// might be.
default:
if err := limiter.incr(ctx, i); err != nil {
return err
}
Expand Down

0 comments on commit b47986a

Please sign in to comment.