Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raft: add MaxInflightBytes limit to the outgoing messages flow #14624

Merged
merged 5 commits into from
Nov 14, 2022

Commits on Nov 13, 2022

  1. 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>
    pav-kv authored and tbg committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    bfb7b16 View commit details
    Browse the repository at this point in the history
  2. raft/tracker: add MaxInflightBytes to ProgressTracker

    This commit plumbs the max total byte size of the Inflights type higher up the
    stack to the ProgressTracker.
    
    Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
    pav-kv authored and tbg committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    7bda0d7 View commit details
    Browse the repository at this point in the history
  3. raft: factor out payloadsSize helper

    Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
    pav-kv authored and tbg committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    8c9c557 View commit details
    Browse the repository at this point in the history
  4. raft: add MaxInflightBytes to Config

    This commit introduces the max inflight bytes setting at the Config level, and
    tests that raft flow control honours it.
    
    Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
    pav-kv authored and tbg committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    68af01c View commit details
    Browse the repository at this point in the history
  5. raft: update changelog

    Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
    pav-kv authored and tbg committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    0ef5df1 View commit details
    Browse the repository at this point in the history