[ 
https://issues.apache.org/jira/browse/FLINK-4741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15693546#comment-15693546
 ] 

ASF GitHub Bot commented on FLINK-4741:
---------------------------------------

GitHub user MayerRoman opened a pull request:

    https://github.com/apache/flink/pull/2862

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

    [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:
    http://netty.io/wiki/user-guide-for-4.x.html

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MayerRoman/flink FLINK-4741

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2862.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2862
    
----
commit 0d43c9a92e806e2c663d61b8db5098622474bf0e
Author: Roman Maier <[email protected]>
Date:   2016-11-24T12:49:00Z

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

----


> WebRuntimeMonitor does not shut down all of it's threads (EventLoopGroups) on 
> exit.
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-4741
>                 URL: https://issues.apache.org/jira/browse/FLINK-4741
>             Project: Flink
>          Issue Type: Bug
>          Components: Webfrontend
>    Affects Versions: 1.1.2
>            Reporter: Joseph Sims
>            Assignee: Roman Maier
>            Priority: Minor
>
> WebRuntimeMonitor does not shutdown correctly, causing the overall 
> application to hang on shutdown. It shuts down bootstrap.group 
> (EventLoopGroup) but not the bootstrap.childGroup (EventLoopGroup).
> If WebRuntimeMonitor is not used (local.start-webserver=false), this problem 
> does not occur.
> Class: WebRuntimeMonitor
> method: stop()
> Line: ~387
> Called:
>     bootstrap.group().shutdownGracefully()
> Not called:
>     bootstrap.childGroup().shutdownGracefully()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to