You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8b38665
Browse filesBrowse the repository at this point in the historyBrowse files
fix(transport): back-pressure the outbound QUIC datagram queue
When the outgoing datagram queue was full, `add_datagram` head-dropped the
oldest queued datagram. On the MASQUE connect-udp path that silently discards
an inner-connection packet the application already handed us, which looks like
loss to the inner connection and hurts upload throughput.
Back-pressure instead of dropping. The queue stays a fixed length;
`send_datagram` always queues the datagram and returns whether the queue still
has room:
- `Ok(true)`: queued, and space remains for more.
- `Ok(false)`: queued, but the queue is now full. The caller should stop
producing datagrams until it receives `OutgoingDatagramSpaceAvailable`.
Nothing already queued is dropped.
The datagram is accepted even when the queue is already at capacity, so a
producer that has already built a datagram never has to hold it in a queue neqo
cannot reach. `Ok(false)` is a high-watermark signal to stop, not a rejection.
`OutgoingDatagramSpaceAvailable` fires once the queue drops back below capacity,
whether a slot was freed by sending or by dropping a too-big datagram, so a
sender is never left blocked while space already exists. It is surfaced to
HTTP/3 clients as `Http3ClientEvent::OutgoingDatagramSpaceAvailable` and to
HTTP/3 servers as `Http3ServerEvent::OutgoingDatagramSpaceAvailable`, analogous
to `SendStreamWritable`.
Scope: this covers the QUIC datagram queue only. The connect-udp HTTP DATAGRAM
Capsule fallback (used when the peer offers no QUIC datagram support) still
drops on a full control stream and reports success; giving it backpressure is
left for a follow-up (see `write_datagram_capsule`).
Removes the now-unreachable `OutgoingDatagramOutcome::DroppedQueueFull` variant
and the `dropped_queue_full` stat.
Fixes#2852
0 commit comments