Github user ivmaykov commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/669#discussion_r226757240
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
 ---
    @@ -335,29 +260,34 @@ public void operationComplete(ChannelFuture future)
         CnxnChannelHandler channelHandler = new CnxnChannelHandler();
     
         NettyServerCnxnFactory() {
    -        bootstrap = new ServerBootstrap(
    -                new NioServerSocketChannelFactory(
    -                        Executors.newCachedThreadPool(),
    -                        Executors.newCachedThreadPool()));
    -        // parent channel
    -        bootstrap.setOption("reuseAddress", true);
    -        // child channels
    -        bootstrap.setOption("child.tcpNoDelay", true);
    -        /* set socket linger to off, so that socket close does not block */
    -        bootstrap.setOption("child.soLinger", -1);
    -        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
    -            @Override
    -            public ChannelPipeline getPipeline() throws Exception {
    -                ChannelPipeline p = Channels.pipeline();
    -                if (secure) {
    -                    initSSL(p);
    -                }
    -                p.addLast("servercnxnfactory", channelHandler);
    -
    -                return p;
    -            }
    -        });
             x509Util = new ClientX509Util();
    +
    +        EventLoopGroup bossGroup = new NioEventLoopGroup(0, 
Executors.newCachedThreadPool());
    --- End diff --
    
    See comment above about making epoll optional based on a config option.


---

Reply via email to