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

Ted Dunning commented on ZOOKEEPER-1310:
----------------------------------------

{quote}
On the other hand, I do recall reading somewhere that it's a known limitation 
of ZK that you don't get notified of a session loss until the client gets 
reconnected to the ensemble.... Maybe others can chime in with clarification 
and give us more specifics.
{quote}

It isn't so much a limitation of ZK as a limitation of physics.  ZK can tell 
you when the connection is lost, but until the connection is re-established, it 
can't tell you that your session was expired by the server because only the 
server really knows that.  Even running a local timer is not a reliable 
indicator because the quorum may be down and not registering the passage of 
time.  In fact, you can't even know how much time has passed very reliably due 
to effects like clock stretching in VM's or the ever-present risk of somebody 
setting the clock.

                
> C Api should use state CONNECTION_LOSS
> --------------------------------------
>
>                 Key: ZOOKEEPER-1310
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1310
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: c client
>         Environment: Linux
>            Reporter: Jakub Lekstan
>
> I would like to ZooKeeper let know my watcher (which I'm giving to 
> zookeeeper_init) about CONNECTION_LOSS, right the given watcher doesn't know 
> that connection is lost due to what I can't do my stuff.
> What you think? If so I could try to create a patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to