drpcwire: add KindWindowUpdate flow-control frame#69
Draft
suj-krishnan wants to merge 1 commit into
Draft
Conversation
Define the KindWindowUpdate control frame that carries a flow-control credit grant: a varint byte delta in the body, with the stream id selecting the window (0 for the connection-level window). Add WindowUpdateFrame/ParseWindowUpdate helpers to build and read it. The frame is sent with the control bit set, so a peer that predates flow control ignores it (handlePacket already drops unknown control packets) rather than erroring, preserving mixed-version compatibility. This is dormant scaffolding for the flow-control work: nothing emits or acts on the frame yet. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
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.
Implement credit-based flow control for multiplexed DRPC connections. This change adds the wire format only - it is dormant scaffolding; nothing emits or acts on the frame yet.
What
KindWindowUpdatecontrol frame: carries a flow-control credit grant — a varint byte delta in the body, with the stream id selecting the window (0 = connection-level).WindowUpdateFrame/ParseWindowUpdatehelpers to build and read it.Compatibility
The frame is sent with the control bit set, so a peer that predates flow control ignores it (
handlePacketalready drops unknown control packets) rather than erroring — preserving mixed-version compatibility.Tests
Stringer, append/parse round-trip (connection-level, per-stream, large delta), and wrong-kind rejection.
Draft: opening early for visibility. Subsequent phases (send-side credit gate, receive-side grants, scheduling, rollout) will stack on this branch.