zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivmaykov <...@git.apache.org>
Subject [GitHub] zookeeper pull request #669: ZOOKEEPER-3152: Port ZK netty stack to netty4
Date Fri, 19 Oct 2018 19:26:17 GMT
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.


---

Mime
View raw message