Repository navigation
feat(noq-proto): deprecate send_fairness and remove unfair scheduling - #835
Conversation
d99cef5 to
1438f7f
Compare
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/835/docs/noq/ Last updated: 2026-10-21T14:12:56Z |
|
Isn't send fairness false the same as a single group with incremental=false in #833 ? I'm kind of in favour of this, but am a little worried about treating this as a feature rather than a breaking change. I'm happy to deprecate it. I'm also happy to say that it doesn't do anything if you also use a stream affinity API once it's deprecated. I'm also happy to replace it with "create a single group with incremental=false" once #833 exists. But changing it to simply be a no-op is pushing the limits of backwards compatibility a little and I need to have some more time getting used to that idea. |
Yeah I think incremental=false will cover any use case that send_fairness(false) had.
Is this about the PR title? Not sure what else is correct here, given this is a minor-level semver bump? |
This is about the implementation. E.g. if #833 is implemented the implementation of send_fainess=false can become "configure a single group with incremental=false". But right now it turns into a no-op. Is that really simply "a new feature" for semver purposes, or is this really a breaking change since something that was possible, no longer is. |
…g (noq-proto/src/config/transport.rs)
…g (noq-proto/src/connection/mod.rs)
…to own n0-computer#835 baseline Preserve fork-specific congestion check, datagram scheduling, alloc/core paths, and existing timer APIs. Include tests for Any, Sticky and Block. Experimental only; no production integration.
flub
left a comment
There was a problem hiding this comment.
I'm having a really hard time approving this because I do think this is taking the mickey out of API stability. But we seem to be stuck at this so yolo I guess.
1438f7f to
8cfde5e
Compare
scheduling Always schedule equal-priority streams round-robin, removing continuation handling before introducing stream affinity. Keep the setter as a deprecated no-op for source compatibility.
8cfde5e to
b0f0f8e
Compare
…uter#836) ## Description Implements setting a stream's affinity to being sent on paths. See the doc comment on `SendStream::set_affinity` for more information. This is implemented via keeping multiple `PendingStreamsQueue`s instead of just one: One queue for each possible affinity, except `StreamAffinity::Block`, which doesn't need a queue. On sending in each path, we first check the `any` queue, and then compare it with pending streams that are pinned to our path. Between these we compare which one is supposed to go first and use that. When a stream changes affinity, we need to potentially move it between queues. If a stream goes from blocked to another affinity, we don't restore its recency, instead, we give it a new one. This is as if the data the stream had queued were submitted just when switching. This is to avoid a situation in which someone suddenly unblocks a lot of small streams after a long time of being blocked and these streams suddenly jumping the queue and starving out other streams. ## API Changes - Adds `noq_proto::StreamAffinity` - Adds `noq_proto::SendStream::set_affinity` ## Notes & open questions - Plan is to also add APIs for noq, but not in this PR - This is stacked on top of n0-computer#835 because that simplifies this implementation. - This somewhat conflicts with n0-computer#859 but the conflicts are reconcilable. - I'm using `PendingQueueMut` as an abstraction to ensure we don't accidentally leave empty `PendingStreamsQueue`s around for sticky paths that don't exist anymore. ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All API changes documented. - [x] `cargo make` passes locally. --------- Co-authored-by: Floris Bruynooghe <[email protected]>
Description
Always schedule equal-priority streams round-robin, removing continuation handling before introducing stream affinity. Keep the setter as a deprecated no-op for source compatibility.
API Changes
noq::TransportConfig::send_fairnessis now deprecated.Notes & open questions
We might want to wait for #833 before we release with this PR, so we can have an alternative to link to in deprecation documentation (the
incremental=falsesetting).Change checklist
cargo makepasses locally.