[ https://issues.apache.org/jira/browse/ZOOKEEPER-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267675#comment-13267675 ]
Mark Gius commented on ZOOKEEPER-1310: -------------------------------------- I don't think the bug reporter is asking about Zookeeper Session level information. More information about the underlying socket connection to zookeeper. I'm running into similar problems were the C api gets disconnected from an endpoint that isn't coming back. I get a single CONNECTING event and then the C bindings spin more or less forever trying to reconnect to the now defunct endpoint. In order to make informed decisions about what to do the client needs to inform calling code (probably via the session event mechanism) that a connection has failed X number of times, or periodically inform the caller that the connection is still down. Once this information is exposed to the caller they can act on the information. For example, if I can detect that my endpoint is no longer present before Zookeeper decides to expire my session, I may be able to salvage my ephemeral nodes if I can re-establish a connection to the cluster fast enough. > 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