[ https://issues.apache.org/jira/browse/ZOOKEEPER-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14195173#comment-14195173 ]
Hongchao Deng commented on ZOOKEEPER-2069: ------------------------------------------ Hi [~fpj], Experimented a few cases over past days. My finding regarding your comments: bq. Shouldn't isConnected return true in the case channel isn't null instead of channelFactory? In fact, it sounds like this implementation is instantiating a new ChannelFactory every time it tries to connect (modulo an attempt already being in progress). It doesn't sound necessary. Yes. isConnected had better be based on (channel != null && channel.isConnected). However, I found a problem reusing channelFactory -- Some un-handled errors that happened in Netty channel closing will propodate in the executors thread pool and crash later connection tries. It can be resolved by creating a new channelFactory for every new connect. I couldn't come up with perfect solutions to isolate channel errors on top of my head. > Netty Support for ClientCnxnSocket > ---------------------------------- > > Key: ZOOKEEPER-2069 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2069 > Project: ZooKeeper > Issue Type: Sub-task > Reporter: Hongchao Deng > Assignee: Hongchao Deng > Attachments: QA-run-nettyclient-for-test.patch, > ZOOKEEPER-2069-v2.patch, ZOOKEEPER-2069-v3.patch, ZOOKEEPER-2069-v4.patch, > ZOOKEEPER-2069-v5.patch, ZOOKEEPER-2069-v6.patch, ZOOKEEPER-2069.patch, > draft.patch > > > Review Board: https://reviews.apache.org/r/27244/diff/# -- This message was sent by Atlassian JIRA (v6.3.4#6332)