Skip to content

docs, tests: the h2 streamed-both text says a handler that stops reading stalls only its own stream's upload, and the early-answer comment gives h2's stop as up to 320 KiB (#618) - #629

Merged
MDA2AV merged 2 commits into
mainfrom
fix-618
Nov 15, 2026

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Fixes #618.

What was wrong. Two texts still described the receive window ioxide.http2 had before its connection window was opened:

  • docs/index.html, below the HTTP/2 "both directions streamed" sample: "the difference is HTTP/2's shared connection window, which a handler that stops reading holds down for every other stream on the connection." The server now opens its connection receive window to 2^31-1 right behind its SETTINGS and tops it back up once it falls below a quarter (Http2Connection.cs at the preface, HandleData in Http2Connection.Frames.cs). So a stream's unread body is held only by that stream's own window (RFC 9113 6.9), and no other stream's upload waits on it.
  • tests/Ioxide.Tests.E2E/Protocols/EarlyAnswerTests.cs: "Measured stops are 64 KiB on h2, the connection window". The h2 stop is now bounded by the 256 KiB stream window.

What changes. Text only. Nothing a caller would notice changes.

  • The docs sentence now reads: "Mirrors h3 · request + response streamed. The server keeps its own connection window open, so a handler that stops reading stalls only its own stream's upload." These are the words the Playground's ManagedStreamedBoth sample already uses. The sentence describes only what ioxide.http2 does and no longer compares windows with the h3 sample.
  • The test comment now reads: "Measured stops are up to 320 KiB on h2, the stream window and what the client had buffered, and 192 KiB on h3; these leave room for a slow box." The bars (H2Stopped 512 KiB, H3Stopped 1 MiB) are unchanged.

Confirmed by measuring, not only by reading. A scratch program (not committed) built this test file with each measured stop printed, plus two checks of its own. It ran pinned at main (19aec5c) and at main's commit before the window was opened (59b4c54):

59b4c54 main
h2 early-answer stop, both tests 65,536 bytes 131,072 to 327,680 bytes over 18 readings, never more
the same with a 128 KiB, 512 KiB or 1 MiB stream window 65,536 at each at most the window plus 64 KiB at each, and 196,608, 589,824 and 1,114,112 were reached
h3 (nghttp3) early-answer stop 196,608 196,608 in all 18 readings
one connection: stream 1's handler never reads, then stream 3 uploads 8 MiB to a handler that reads it stream 3 took 59,018 ms, and went through only once the client's own 60 s timeout reset stream 1 stream 3 took 7 to 11 ms, while stream 1 stayed at 327,680

327,680 is the 256 KiB stream window plus one 64 KiB read that the client's upload had taken and could not send yet. The stop comes out lower when the server's reset reaches the client before the window fills. The last row checks on the server that both streams arrived on the same connection.

Tests. None added. The change is a docs sentence and a code comment, so no test can fail without it. The suites were skipped for the same reason. Built pinned (dotnet build -c Release ioxide.slnx): 0 errors and the same 7 warnings main has, none of them in these files.

Overlaps.

CI. Both jobs pass. ubuntu-latest passed on the first attempt: Unit 263, E2E 723 (7 skipped), Http 104, Pg 26, Redis 6 (1 pending), Tls 269, File 13, Chaos 105. ubuntu-24.04-arm's first attempt failed in E2E on "h2 RunAsync begun on the thread pool (http2): an upload read and echoed from the pool arrives whole, served on the reactor" ("the transport was only called from its reactor (3 calls from elsewhere)"). That is the intermittent failure #614 tracks, and a text change cannot touch it. The re-run passed with the same counts as ubuntu-latest.

Generator. scripts/gen-docs-panes.py writes every pane's note into docs/index.html, so it now carries the same sentence; running it leaves the page unchanged.

…ing stalls only its own stream's upload, and the early-answer comment gives h2's stop as up to 320 KiB (#618)

The docs page's HTTP/2 both-directions-streamed sample said a handler that stops reading holds the shared connection window down for every other stream on the connection. The server now opens its connection receive window to 2^31-1 behind its SETTINGS and tops it up below a quarter, so a handler that stops reading holds only its own stream's window. The page says so, in the words the Playground sample already uses.

EarlyAnswerTests gave the h2 stop as 64 KiB, the connection window. Measured at main it is up to 320 KiB: the 256 KiB stream window, plus the 64 KiB the upload's copy buffer has taken and not yet sent. The 512 KiB bar is unchanged.
…ge now has, so regenerating the page keeps it (#618)
@MDA2AV
MDA2AV merged commit 1d435ec into main Nov 15, 2026
2 checks passed
@MDA2AV
MDA2AV deleted the fix-618 branch November 15, 2026 16:41
@MDA2AV MDA2AV mentioned this pull request Nov 15, 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.

docs, tests: the h2 streamed-both page text and an early-answer test comment still describe the connection window #593 opened

1 participant