Skip to content

drpcwire: add KindWindowUpdate flow-control frame#69

Draft
suj-krishnan wants to merge 1 commit into
mainfrom
sujatha/flow-control-window-update
Draft

drpcwire: add KindWindowUpdate flow-control frame#69
suj-krishnan wants to merge 1 commit into
mainfrom
sujatha/flow-control-window-update

Conversation

@suj-krishnan

@suj-krishnan suj-krishnan commented Jun 30, 2026

Copy link
Copy Markdown

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

  • KindWindowUpdate control 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 / ParseWindowUpdate helpers to build and read it.

Compatibility

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.

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.

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>
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