You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
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
docs(command): name max_command_buffer_size as the channel wire-lengt…
docs(command): name max_command_buffer_size as the channel wire-lengt…
docs(command): name max_command_buffer_size as the channel wire-lengt…
docs(command): name max_command_buffer_size as the channel wire-lengt…