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

Http2FrameCodec to simulate GOAWAY received when stream IDs are exhausted #9095

Merged

Conversation

Projects
None yet
3 participants
@Scottmitch
Copy link
Member

commented Apr 26, 2019

Motivation:
Http2FrameCodec currently fails the write promise associated with creating a
stream with a Http2NoMoreStreamIdsException. However this means the user code
will have to listen to all write futures in order to catch this scenario which
is the same as receiving a GOAWAY frame. We can also simulate receiving a GOAWAY
frame from our remote peer and that allows users to consolidate graceful close
logic in the GOAWAY processing.

Modifications:

  • Http2FrameCodec should simulate a DefaultHttp2GoAwayFrame when trying to
    create a stream but the stream IDs have been exhausted.
Http2FrameCodec to simulate GOAWAY received when stream IDs are exhau…
…sted

Motivation:
Http2FrameCodec currently fails the write promise associated with creating a
stream with a Http2NoMoreStreamIdsException. However this means the user code
will have to listen to all write futures in order to catch this scenario which
is the same as receiving a GOAWAY frame. We can also simulate receiving a GOAWAY
frame from our remote peer and that allows users to consolidate graceful close
logic in the GOAWAY processing.

Modifications:
- Http2FrameCodec should simulate a DefaultHttp2GoAwayFrame when trying to
create a stream but the stream IDs have been exhausted.

Result:
Applications can rely upon GOAWAY for graceful close processing instead of also
processing write futures.

@Scottmitch Scottmitch requested review from normanmaurer and ejona86 Apr 26, 2019

@ejona86
Copy link
Member

left a comment

And we don't need to send a GOAWAY because reading a GOAWAY currently doesn't trigger a close when all streams are closed.

@ejona86

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

For the record: that was suspiciously easy.

@Scottmitch Scottmitch merged commit 2c12f09 into netty:4.1 Apr 27, 2019

3 checks passed

pull request validation (centos6-java11) Build finished.
Details
pull request validation (centos6-java12) Build finished.
Details
pull request validation (centos6-java8) Build finished.
Details

@Scottmitch Scottmitch deleted the Scottmitch:http2_frame_codec_stream_exhaust_go_away branch Apr 27, 2019

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

Scottmitch added a commit that referenced this pull request Apr 27, 2019

Http2FrameCodec to simulate GOAWAY received when stream IDs are exhau…
…sted (#9095)

Motivation:
Http2FrameCodec currently fails the write promise associated with creating a
stream with a Http2NoMoreStreamIdsException. However this means the user code
will have to listen to all write futures in order to catch this scenario which
is the same as receiving a GOAWAY frame. We can also simulate receiving a GOAWAY
frame from our remote peer and that allows users to consolidate graceful close
logic in the GOAWAY processing.

Modifications:
- Http2FrameCodec should simulate a DefaultHttp2GoAwayFrame when trying to
create a stream but the stream IDs have been exhausted.

Result:
Applications can rely upon GOAWAY for graceful close processing instead of also
processing write futures.
@Scottmitch

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2019

master (76687d1)

@normanmaurer normanmaurer added this to the 4.1.36.Final milestone Apr 28, 2019

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Apr 28, 2019

@Scottmitch please remember to set the milestone in the future otherwise we will miss to include these in the release notes etc (I just did it for all your prs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.