4 Commits

Author SHA1 Message Date
Pavel Kalinnikov
bfb7b16f4f raft/tracker: add byte size limit to Inflights type
The Inflights type has limits on the message size and the number of inflight
messages. However, a single large entry that exceeds the size limit can still
be sent. In combination with the max messages count limit, many large messages
can be sent in a row and overflow the receiver. In effect, the "max" values act
as "target" rather than hard limits.

This commit adds an additional soft limit on the total size of inflight
messages, which catches such situations and prevents the receiver overflow.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
Pavel Kalinnikov
765a2660bc raft/tracker: use testify packages in tests
This commit removes the verbose comparisons in tests, in favor of using
assert/require helpers from the testify packages.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 23:08:54 +00:00
Pavel Kalinnikov
467114ed87 raft/tracker: remove unused Inflights.FreeFirstOne
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:39 +00:00
Tobias Schottdorf
f9c2d00fb3 raft: extract 'tracker' package
Mechanically extract `progressTracker`, `Progress`, and `inflights`
to their own package named `tracker`. Add lots of comments in the
progress, and take the opportunity to rename and clarify various
fields.
2019-06-21 22:15:00 +02:00