quic: align stream priority with W3C WebTransport sendOrder#64454
Open
SparshGarg999 wants to merge 1 commit into
Open
quic: align stream priority with W3C WebTransport sendOrder#64454SparshGarg999 wants to merge 1 commit into
SparshGarg999 wants to merge 1 commit into
Conversation
Collaborator
|
Review requested:
|
14e724b to
7d3c9c1
Compare
Contributor
|
@SparshGarg999 |
Author
|
Reopening to address the feedback properly. I'll fix the sendOrder range issue (it should accept any integer, not just [0,7]) and note sendGroups as a follow-up that requires upstream ngtcp2 support. |
Adds the numeric sendOrder option to createBidirectionalStream, createUnidirectionalStream, and setPriority, aligning with the W3C WebTransport sendOrder concept where a lower value indicates a higher priority. This maps directly to the raw QUIC stream urgency value (an integer in the range [0, 7]). Additionally, the priority getter is updated to return sendOrder`nrepresenting the current raw QUIC stream urgency value. Fixes: nodejs#63654 Signed-off-by: SparshGarg999 <sparshgarg999@gmail.com>
7d3c9c1 to
2003bae
Compare
Author
|
Hi! I've updated the implementation to address your feedback:
|
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.
Summary
Align the experimental QUIC stream prioritization options with W3C WebTransport priority semantics by adding the numeric
sendOrderoption.Description
Currently, Node's experimental QUIC implementation supports a string-based priority level ('high', 'default', 'low'). However, the W3C WebTransport specification defines stream priority using a grouped
sendGroupand a numericsendOrderproperty (where lower values represent higher priority/urgency).To align Node's QUIC stream priority API with WebTransport's semantics, this commit introduces the numeric
sendOrderoption.sendOrdermaps directly to the underlying raw QUIC stream urgency value (an integer in the range[0, 7]).sendOrderis specified at stream creation (viacreateBidirectionalStreamorcreateUnidirectionalStream) or viasetPriority(), it overrides/takes precedence over the string-basedprioritylevel.prioritygetter is updated to returnsendOrderalongsidelevelandincrementalproperties, exposing the exact urgency level of the stream.sendOrderis an integer in the range[0, 7]and throws appropriate errors (ERR_OUT_OF_RANGE/ERR_INVALID_ARG_TYPE) for invalid inputs.Verification
Updated
test/parallel/test-quic-h3-priority.mjsto:sendOrdervalue returned in theprioritygetter matches the priority level or explicitsendOrdervalue set.sendOrderat stream creation time.sendOrderviasetPriority().sendOrdertypes and out-of-range values.Fixes: #63654