zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andor Molnar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3015) Publish the value of getIdleRecv() in WatchedEvent of Disconnected
Date Sun, 01 Apr 2018 12:02:00 GMT

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


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

View raw message