You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hongchao Deng (JIRA)" <ji...@apache.org> on 2014/10/28 23:28:35 UTC

[jira] [Commented] (ZOOKEEPER-2072) Netty Server Should Configure Child Channel Pipeline By Specifying ChannelPipelineFactory

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

Hongchao Deng commented on ZOOKEEPER-2072:
------------------------------------------

[~fpj] [~rakeshr] [~fournc] [~abranzyck] [~iandi]

I need to make this change as part of Netty SSL work.

If I tried changing the [code|https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java#L256] by doing
{code}
        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
            @Override
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline p = Channels.pipeline();
                p.addLast("servercnxnfactory", channelHandler);

                return p;
            }
        });
{code}

NettyServerCnxnTest is failing. The test was introduced in ZOOKEEPER-1179. It seems that it was assuming single pipeline. I was wondering if a thread sleep would be a quick fix here. Or anyone has any idea.=?

> Netty Server Should Configure Child Channel Pipeline By Specifying ChannelPipelineFactory
> -----------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2072
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2072
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: Hongchao Deng
>            Assignee: Hongchao Deng
>
> Currently, netty server is setting up child channel in this way:
> {code}
>  bootstrap.getPipeline().addLast("servercnxnfactory", channelHandler);
> {code}
> According to the [netty doc|http://netty.io/3.9/api/org/jboss/netty/bootstrap/ServerBootstrap.html],
> bq. you cannot use this approach if you are going to open more than one Channels or run a server that accepts incoming connections to create its child channels.



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