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

[FLINK-4741] Fix for the proper shutdown the ServerBootstrap in the process of stopping the WebRuntumeMonitor #2862

Closed
wants to merge 1 commit into from

Conversation

MayerRoman
Copy link
Contributor

[FLINK-4741] WebRuntimeMonitor does not shut down all of it's threads (EventLoopGroups) on exit.

bootstrap.childGroup().shutdownGracefully() method has been added to the correct shutdown WebRuntimeMonitor.

More detailed explanation:

bootrstrap - it is io.netty.bootstrap.ServerBootstrap - a helper class that sets up a netty-server.

In its work netty-server uses two EventLoopGroups:
The first one, often called 'boss', accepts an incoming connection.
The second one, often called 'worker', handles the traffic of the accepted connection once the boss accepts the connection and registers the accepted connection to the worker.

At the end of netty-server work should be shut down all the threads in each of the two EventLoopGroups.

First EventLoopGroups stops when called bootstrap.group().shutdownGracefully().
To stop the second EventLoopGroups this request adds call of bootstrap.chiledGroup().shutdownGracefully() method.

This proposal corresponds to netty user guide:
https://netty.io/wiki/user-guide-for-4.x.html

@zentol
Copy link
Contributor

zentol commented Nov 25, 2016

Looks reasonable, merging it.

zentol pushed a commit to zentol/flink that referenced this pull request Nov 27, 2016
@asfgit asfgit closed this in 333da3a Nov 27, 2016
alpinegizmo pushed a commit to alpinegizmo/flink that referenced this pull request Nov 28, 2016
liuyuzhong pushed a commit to liuyuzhong/flink that referenced this pull request Dec 2, 2016
liuyuzhong pushed a commit to liuyuzhong/flink that referenced this pull request Dec 5, 2016
static-max pushed a commit to static-max/flink that referenced this pull request Dec 13, 2016
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants