[
https://issues.apache.org/jira/browse/ZOOKEEPER-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14134875#comment-14134875
]
chendihao commented on ZOOKEEPER-1313:
--------------------------------------
[~dlord] Nice and we need this patch to troubleshoot the exceptions from
ZooKeeper.
> Expose/create KeeperException for "Packet len <x> is out of range!" error
> when jute max buffer size is exceeded
> ---------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1313
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1313
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: Daniel Lord
>
> When a zookeeper client receives a Packet that is over the jute max buffer
> limit the behavior that is exposed to the callers of the zookeeper client is
> misleading. When the packet length exceeds the max size an IOException is
> thrown. This is caught and handled by the SendThread by cleaning up the
> current connection and enqueueing a Disconnected event. The immediate caller
> of zookeeper sees this as a ConnectionLossException with a Disconnected event
> on the main Watcher. This state transition is a bit misleading because under
> many circumstances as soon as the SyncConnected event is received retrying
> the same operation will succeed. However, in this case it is likely that the
> zookeeper client will reconnect immediately and if the operation is retried
> the same jute max buffer limit exception will be thrown which will trigger
> another disconnect and reconnect.
> It would be great if the exception was exposed to the caller of the zookeeper
> client some how so that a more appropriate action can be taken. For
> instance, it might be appropriate to fail completely or to attempt to
> establish a new session.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)