[
https://issues.apache.org/jira/browse/ZOOKEEPER-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608708#comment-14608708
]
Arshad Mohammad commented on ZOOKEEPER-2224:
--------------------------------------------
I guess you want to know more about this defect.
The scenario is as follows.
We have three node zookeeper cluster, it is working fine.
We have an application which sends four letter command to one of the zookeeper
servers periodically.
We reduced the network connectivity to 1 KBps between our application and
zookeeper.
The application hanged immediately after reducing the network connectivity.
Even after restoring the connectivity application has not come out. It was
still hanged.
The root cause of the problem is the four letter command, it hangs while
reading from the socket.
class {{org.apache.zookeeper.client.FourLetterWordMain}} has similar code as
bellow
{code}
Socket sock = new Socket(host, port);
sock.read()
{code}
To fix this issue above code should be changed to
{code}
int timeout=someValue
Socket sock = new Socket();
sock.connect(hostaddress, timeout);
sock.setSoTimeout(timeout);
sock.read()
{code}
> Four letter command hangs when network is slow
> ----------------------------------------------
>
> Key: ZOOKEEPER-2224
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2224
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: Arshad Mohammad
> Assignee: Arshad Mohammad
> Priority: Minor
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2224-01.patch
>
>
> Four letter command hangs when network is slow or network goes down in
> between the operation, and the application also, which calling this four
> letter command, hangs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)