You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Ted Dunning <td...@apache.org> on 2011/09/08 22:11:53 UTC
Review Request: Proposed fix to file descriptor leak
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1766/
-----------------------------------------------------------
Review request for zookeeper.
Summary
-------
When connect throws an exception, we can leak descriptors.
Diffs
-----
src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04
Diff: https://reviews.apache.org/r/1766/diff
Testing
-------
See test program and description on https://issues.apache.org/jira/browse/ZOOKEEPER-1174
Thanks,
Ted
Re: Review Request: ZOOKEEPER-1174 Proposed fix to file descriptor leak
Posted by Ted Dunning <td...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1766/#review1904
-----------------------------------------------------------
src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java
<https://reviews.apache.org/r/1766/#comment4386>
Based on Camille's comments, this needs to change to roughly this:
try {
boolean immediateConnect = sock.connect(addr);
sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
if (immediateConnect) {
sendThread.primeConnection();
}
} catch (IOException e) {
LOG.error("Unable to open socket to " + addr);
sock.close();
I have been travelling which has made it hard to produce a coherent patch. Let me do that right now.
- Ted
On 2011-09-14 22:17:36, Ted Dunning wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/1766/
> -----------------------------------------------------------
>
> (Updated 2011-09-14 22:17:36)
>
>
> Review request for zookeeper.
>
>
> Summary
> -------
>
> When connect throws an exception, we can leak descriptors.
>
>
> Diffs
> -----
>
> src/java/main/org/apache/zookeeper/ClientCnxn.java 9ea59ca
> src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04
> src/java/main/org/apache/zookeeper/server/DataTree.java 0690ce9
>
> Diff: https://reviews.apache.org/r/1766/diff
>
>
> Testing
> -------
>
> See test program and description on https://issues.apache.org/jira/browse/ZOOKEEPER-1174
>
>
> Thanks,
>
> Ted
>
>
Re: Review Request: ZOOKEEPER-1174 Proposed fix to file descriptor leak
Posted by Patrick Hunt <ph...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1766/
-----------------------------------------------------------
(Updated 2011-09-14 22:17:36.224102)
Review request for zookeeper.
Summary (updated)
-------
When connect throws an exception, we can leak descriptors.
Diffs
-----
src/java/main/org/apache/zookeeper/ClientCnxn.java 9ea59ca
src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04
src/java/main/org/apache/zookeeper/server/DataTree.java 0690ce9
Diff: https://reviews.apache.org/r/1766/diff
Testing
-------
See test program and description on https://issues.apache.org/jira/browse/ZOOKEEPER-1174
Thanks,
Ted
Re: Review Request: Proposed fix to file descriptor leak
Posted by Ted Dunning <td...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1766/
-----------------------------------------------------------
(Updated 2011-09-08 23:44:11.796112)
Review request for zookeeper.
Changes
-------
This is an updated diff to address Camille's observations.
Summary
-------
When connect throws an exception, we can leak descriptors.
Diffs (updated)
-----
src/java/main/org/apache/zookeeper/ClientCnxn.java 9ea59ca
src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04
src/java/main/org/apache/zookeeper/server/DataTree.java 0690ce9
Diff: https://reviews.apache.org/r/1766/diff
Testing
-------
See test program and description on https://issues.apache.org/jira/browse/ZOOKEEPER-1174
Thanks,
Ted