Repository navigation
Conversation
…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)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.csat the preface,HandleDatainHttp2Connection.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.
H2Stopped512 KiB,H3Stopped1 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):
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.
EarlyAnswerTests.cs. This PR uses http2: an answer waiting on the client's credit has its unread upload credited, so a client that uploads everything first gets it (#588) #604's wording verbatim, so both make the identical change and merge cleanly in either order (git merge-treeexit 0). If http2: an answer waiting on the client's credit has its unread upload credited, so a client that uploads everything first gets it (#588) #604 merges first, this PR's comment change becomes a no-op and only the docs sentence is left.H3Stoppedbar. The 192 KiB in the comment is what the nghttp3 tests measured here; the ioxide.http3 ones were not measured.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.pywrites every pane's note intodocs/index.html, so it now carries the same sentence; running it leaves the page unchanged.