Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always increment Stream Id on createStream #13485

Merged
merged 2 commits into from Jul 19, 2023

Conversation

alecharmon
Copy link
Contributor

Motivation:

When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error.

Modification:

Use a finally block so that we always increment the expected next stream id

Result:

Fixes #12065

@normanmaurer
Copy link
Member

@alecharmon did you sign our ical yet ? https://netty.io/s/icla

@alecharmon
Copy link
Contributor Author

@normanmaurer I did

@normanmaurer normanmaurer added this to the 4.1.95.Final milestone Jul 12, 2023
@normanmaurer
Copy link
Member

/cc @ejona86

@normanmaurer
Copy link
Member

Also @vietj and @idelpivnitskiy

@alecharmon alecharmon force-pushed the AlwaysIncrementStreamId-12065 branch from 9dae3e3 to a5fc728 Compare July 13, 2023 14:49
Motivation:

When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error.

Modification:

Use a finally block so that we always increment the expected next stream id

Result:

Fixes netty#12065
@alecharmon alecharmon force-pushed the AlwaysIncrementStreamId-12065 branch from a5fc728 to 2269e9a Compare July 18, 2023 13:59
@normanmaurer normanmaurer merged commit 4e1a0c3 into netty:4.1 Jul 19, 2023
3 checks passed
@normanmaurer
Copy link
Member

@alecharmon thanks a lot!

normanmaurer added a commit that referenced this pull request Jul 19, 2023
Motivation:

When the creation of a stream causes an error for whatever reason we
want to increment the next expected stream id.
ie: checkNewStreamAllowed raises an error which causes the headers frame
to get rejected subsequently a data frame arrives and it throws a
protocol error.

Modification:

Use a finally block so that we always increment the expected next stream
id

Result:

Fixes #12065

---------

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
normanmaurer added a commit that referenced this pull request Jul 27, 2023
…ug which caused sending multiple RST frames for the same id

Motivation:

This reverts commit 4e1a0c3 as it seems to cause a race in some situations. More investigation needs to be done but for now let's revert it.

Modification:

Revert commit 4e1a0c3

Result:

No more race which cause multiple RST frames to be send for the same stream id.
normanmaurer added a commit that referenced this pull request Jul 27, 2023
…ug which caused sending multiple RST frames for the same id

Motivation:

This reverts commit 4e1a0c3 as it seems to cause a race in some situations. More investigation needs to be done but for now let's revert it.

Modification:

Revert commit 4e1a0c3

Result:

No more race which cause multiple RST frames to be send for the same stream id.
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.

Throwing protocol error when http2 max concurrent streams is exceeded instead of resStream
5 participants