You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Antonio Rafael Rodrigues (JIRA)" <ji...@apache.org> on 2018/03/31 17:03:00 UTC

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

Antonio Rafael Rodrigues created ZOOKEEPER-3015:
---------------------------------------------------

             Summary: 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


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)