Skip to content

docs: configure_admin_ops §5.2 says the command-channel wire-length bound is command_buffer_size, but the code checks max_command_buffer_size #1421

Closed

Description

@FlorentinDUBOIS

doc/configure_admin_ops.md §5.2 describes the command channel's wire-length bound as:

the new upper bound rejects any peer-sent length that exceeds the configured command_buffer_size

The code checks a different value. Channel::try_read_delimited_message (command/src/channel.rs)
compares against self.max_buffer_size, which comes from max_command_buffer_size, not
command_buffer_size.

Those are different keys with different defaults — DEFAULT_COMMAND_BUFFER_SIZE is 1,000,000 and
DEFAULT_MAX_COMMAND_BUFFER_SIZE is 2,000,000 — so the document understates the accepted bound by a
factor of two under default configuration, and by whatever ratio an operator has configured otherwise.

Why it matters more than a typo

This is the paragraph an operator reads when deciding how to size the command channel against a
hostile or buggy peer. Someone tuning command_buffer_size down to tighten the bound would be
tightening the wrong knob, and would conclude the bound is lower than it is.

It also names the wrong key for anyone tracing the check back to its source, which is the usual reason
a documentation error survives — the reader assumes they misread the code rather than the document.

Provenance

Confirmed pre-existing: the file is untouched by #1416's fix
(fix/channel-buffer-size-validation), and the max_buffer_size comparison it misdescribes is
unchanged at 595920e91c4528f0554410b904b45d543c88e467.

It surfaced during review of that changeset, which added cross-validation between
command_buffer_size and max_command_buffer_size — the two keys this paragraph conflates.

What I verified, and what I did not

Verified by reading at 595920e9: the text of §5.2, that try_read_delimited_message compares
message_len against self.max_buffer_size, that max_buffer_size is populated from
max_command_buffer_size through Channel::new's callers, and the two default constants.

Not verified: I did not check whether any other document repeats the same conflation, nor whether
§5.2 was accurate when written and drifted afterwards — it may predate a rename.

Activity

  1. added 3 commits that reference this issue on Sep 22, 2026
    caf3edb
    4a75efd
    0f95fd4
  2. added a commit that references this issue on Sep 22, 2026
    5f49716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions