Skip to content

Commit

Permalink
tracker: throttle empty probes
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kalinnikov <[email protected]>
  • Loading branch information
pav-kv committed Mar 6, 2024
1 parent e246b8d commit 01d44ed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tracker/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,7 @@ func (pr *Progress) SentEntries(entries int, bytes uint64) {
// consider this message being a probe, so that the flow is paused.
pr.MsgAppFlowPaused = pr.Inflights.Full()
case StateProbe:
// TODO(pavelkalinnikov): this condition captures the previous behaviour,
// but we should set MsgAppFlowPaused unconditionally for simplicity, because any
// MsgApp in StateProbe is a probe, not only non-empty ones.
if entries > 0 {
pr.MsgAppFlowPaused = true
}
pr.MsgAppFlowPaused = true
default:
panic(fmt.Sprintf("sending append in unhandled state %s", pr.State))
}
Expand Down

0 comments on commit 01d44ed

Please sign in to comment.