[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Dunning updated ZOOKEEPER-1174:
-----------------------------------

    Attachment: ZOOKEEPER-1174.patch

Here is an updated patch that maintains the sockKey even for immediate loads.  
My guess is that this didn't matter in testing so far because it is rare for an 
async socket to connect instantly.

This addresses Camille's eagle-eyed comments.

I have added a few javadoc fixes and one weakening of a catch from Exception to 
Throwable in the general spirit of making things better when I see them.  They 
are unrelated to this JIRA, but are very minor so do not warrant their own bug 
report. 

> FD leak when network unreachable
> --------------------------------
>
>                 Key: ZOOKEEPER-1174
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1174
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.3.3
>            Reporter: Ted Dunning
>            Assignee: Ted Dunning
>            Priority: Critical
>             Fix For: 3.3.4
>
>         Attachments: ZOOKEEPER-1174.patch, ZOOKEEPER-1174.patch, 
> zk-fd-leak.tgz
>
>
> In the socket connection logic there are several errors that result in bad 
> behavior.  The basic problem is that a socket is registered with a selector 
> unconditionally when there are nuances that should be dealt with.  First, the 
> socket may connect immediately.  Secondly, the connect may throw an 
> exception.  In either of these two cases, I don't think that the socket 
> should be registered.
> I will attach a test case that demonstrates the problem.  I have been unable 
> to create a unit test that exhibits the problem because I would have to mock 
> the low level socket libraries to do so.  It would still be good to do so if 
> somebody can figure out a good way.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to