hadoop-zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Reed (JIRA)" <j...@apache.org>
Subject [jira] Updated: (ZOOKEEPER-519) Followerhandler should close the socket if it gets an exception on a write.
Date Wed, 18 Nov 2009 17:46:40 GMT

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

Benjamin Reed updated ZOOKEEPER-519:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed revision 881847.

> Followerhandler should close the socket if it gets an exception on a write.
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-519
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-519
>             Project: Zookeeper
>          Issue Type: Bug
>            Reporter: Mahadev konar
>            Assignee: Mahadev konar
>             Fix For: 3.3.0
>
>         Attachments: ZOOKEEPER-519.patch
>
>
> We noticed this in our tests -
> {code}
> java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
>         at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
>         at java.io.DataOutputStream.write(DataOutputStream.java:90)
>         at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
>         at org.apache.jute.BinaryOutputArchive.writeBuffer(BinaryOutputArchive.java:122)
>         at org.apache.zookeeper.server.DataNode.serialize(DataNode.java:126)
>         at org.apache.jute.BinaryOutputArchive.writeRecord(BinaryOutputArchive.java:126)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:878)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:890)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:890)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:890)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:890)
>         at org.apache.zookeeper.server.DataTree.serializeNode(DataTree.java:890)
>         at org.apache.zookeeper.server.DataTree.serialize(DataTree.java:940)
>         at org.apache.zookeeper.server.util.SerializeUtils.serializeSnapshot(SerializeUtils.java:102)
>         at org.apache.zookeeper.server.ZooKeeperServer.serializeSnapshot(ZooKeeperServer.java:269)
>         at org.apache.zookeeper.server.quorum.FollowerHandler.run(FollowerHandler.java:263)
> {code}
> So the followerhandler got an exception while writing to the socket but the follower
was still waiting on the socket for a read and got a read timeout after 60 seconds or so.
To just make sure we handle this rightly, we should close the socket at the followerhandler
when we get an excpetion, so that the follower immediately recognizes that its disconnected
from the leader.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message