Skip to content

fix(moq-tokio): finite default connection receive window (backport #4605) - #4858

Merged
kixelated merged 1 commit into
releasefrom
quest/m0/branch-flip
Oct 6, 2026
Merged

kixelated merged 1 commit into
releasefrom
quest/m0/branch-flip

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Backport of #4605 onto release. Quest: quest/m0/branch-flip.md (the remaining item only; the branch flip itself already landed).

Problem

release still leaves the connection receive window at the transport default, which is unlimited (VarInt::MAX). One peer can make the relay buffer about 12.5 GB per connection (max_streams 10k times the 1.25 MB stream window). main already applies 64 MiB when quic.receive_window is unset (#4605, 275af93).

Approach

Cherry-pick the moq-tokio and docs changes from 275af93. noq and iroh call receive_window with the configured value, or DEFAULT_RECEIVE_WINDOW (64 MiB) when it is unset. An explicit value still wins. Resolved.receive_window stays None when unset, so the io_uring workers can keep refusing an explicit window.

The quest-file hunks in that commit (quest/m0/README.md, quest/m0/noq-reassembly-cap.md, quest/m1/quic/fork/README.md) are not in this PR. They already landed on main with #4605, and they do not apply cleanly onto release.

Impact

  • Public API: none. quic::Config::receive_window and quic::Resolved::receive_window stay Option<u64>. The new DEFAULT_RECEIVE_WINDOW constant is pub(crate).
  • Behavior: noq and iroh connections advertise a 64 MiB initial MAX_DATA instead of 2^62 - 1 when the knob is unset. A peer can have at most 64 MiB of unread data across all of its streams.
  • Wire: no MoQ format change.

Alternatives

  • Resolving the default inside Config::resolve so Resolved shows 64 MiB. That makes the io_uring workers refuse every config, because they reject any Some window.
  • Leaving release unlimited until the next cut. The cut is not happening yet, and this is the urgent bound the quest still calls for.

Follow-ups

(Written by Grok 4.7)

…bly cap, part 1) (#4605)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Took over the stale claim at f25cfbd (empty "quest: claim branch-flip", no open PR) with --force-with-lease onto a branch based on origin/release.

Cherry-picked 275af93 without the quest-tree hunks. just check origin/release passed locally. Left as a draft. Deleting quest/m0/branch-flip.md belongs on main after this merges, not in this PR.

(Written by Grok 4.7)

@kixelated
kixelated marked this pull request as ready for review October 6, 2026 06:00
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Grok 4.7)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T06:26:49.701138Z 2645bcc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 2645bcc342

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kixelated

Copy link
Copy Markdown
Collaborator Author

Backport of #4605 onto release. When quic.receive_window is unset, noq and iroh advertise a 64 MiB connection window instead of the unlimited transport default. An explicit value still wins, and Resolved.receive_window stays unset so the io_uring workers can keep refusing an explicit window. Public API is unchanged. Wire: an unset session's initial MAX_DATA is 64 MiB, not 2^62-1.

Confirmed: do not delete quest/m0/branch-flip.md here. That file lives on main and comes out in a follow-up after this lands. Codex reviewed 2645bcc342ee77c49308b6367f467573866bf3c9 and found no issues. Check and Test are green.

(Written by Grok 4.7)

@kixelated
kixelated merged commit 5b9344a into release Oct 6, 2026
5 checks passed
@kixelated
kixelated deleted the quest/m0/branch-flip branch October 6, 2026 06:27
@moq-bot moq-bot Bot mentioned this pull request Oct 6, 2026
@moq-bot moq-bot Bot mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant