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

Edward Ribeiro commented on ZOOKEEPER-2280:
-------------------------------------------

Hi [~rgs], thanks for the review. I addressed your review points.

{quote}
    cnxn.close();
   ctx.getChannel().close().awaitUninterruptibly();

Can any of that throw anything? If so, should we - silently - catch that and 
ignore?
{quote}

*Afaik, it doesn't throw anything but I am gonna double check that asap!*

{{NIOServerCnxnFactory}} throws an exception when the connection is refused. 
Throwing an exception in {{NettyServerCnxnFactory}} would still let the 
connection proceed, so I opted for explicitly close the connection and log the 
error. _Please_, I would like to hear from you guys ([~phunt]?) if this is the 
right way of doing so...

I implemented the Watcher to keep track of the connections with a 
CountDownLatch, but the initial value of this CountDownLatch has to be the max 
number of accepted connections, because otherwise the Thread will hang (as the 
patch refuses connections beyond that limit). 

Finally, I have solved two Findbugs issues that were created when I changed 
{{ipMap}} in {{NettyServerCnxnFactory}} from {{Map}} to a  {{ConcurrentMap}}. 
Please, let me know what you think. You can see all those changes on the github 
PR above. Cheers!

> NettyServerCnxnFactory doesn't honor maxClientCnxns param
> ---------------------------------------------------------
>
>                 Key: ZOOKEEPER-2280
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2280
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.6, 3.5.0, 3.5.1
>            Reporter: Edward Ribeiro
>            Assignee: Edward Ribeiro
>             Fix For: 3.5.1
>
>         Attachments: ZOOKEEPER-2280.patch
>
>
> Even though NettyServerCnxnFactory has maxClientCnxns (default to 60) it 
> doesn't enforce this limit in the code.



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

Reply via email to