You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Andor Molnar (JIRA)" <ji...@apache.org> on 2018/04/01 12:02:00 UTC

[jira] [Commented] (ZOOKEEPER-3015) Publish the value of getIdleRecv() in WatchedEvent of Disconnected

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421635#comment-16421635 ] 

Andor Molnar commented on ZOOKEEPER-3015:
-----------------------------------------

[~arrodrigues]

I think this addition makes sense from client's perspective. How would you like to do it exactly?

Wouldn't it be better to introduce new KeeperState value, for example ClientSessionTimeout?

> Publish the value of getIdleRecv() in WatchedEvent of Disconnected
> ------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3015
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3015
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.5.3
>            Reporter: Antonio Rafael Rodrigues
>            Priority: Minor
>
> In the class ClientCnxn, at the line 1247:
> eventThread.queueEvent(new WatchedEvent(
>                                     Event.EventType.None,
>                                     Event.KeeperState.Disconnected,
>                                     null));
> The current value of getIdleRecv() could be published inside the WatchedEvent, so that the clients that are listening to this event could know exactly how many time has been elapsed.
> This would be specially useful in the case of the message "Client session timed out, have not heard from server in " . When the client receive a WatchedEvent with Event.KeeperState.Disconnected, it doesn't know if it was due to a immediate loss of connection or a lack of heart beats. Publishing the value of getIdleRecv() would give a clue on that.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)