Re: zookeeper_interest returning ZOK on Connection Loss

2013-04-08 Thread Yunong Xiao
On Mar 27, 2013, at 10:49 AM, Marshall McMullen marshall.mcmul...@gmail.com wrote: We already have a ZOO_NOTCONNECTED_STATE. Seems like that should work for these purposes... On Wed, Mar 27, 2013 at 11:23 AM, Michi Mutsuzaki mi...@cs.stanford.eduwrote: Hi Anthony, Is there a open

[jira] [Updated] (ZOOKEEPER-1676) C client zookeeper_interest returning ZOK on Connection Loss

2013-03-28 Thread Yunong Xiao (JIRA)
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yunong Xiao updated ZOOKEEPER-1676: --- Component/s: c client C client zookeeper_interest returning ZOK on Connection Loss

[jira] [Created] (ZOOKEEPER-1676) C client zookeeper_interest returning ZOK on Connection Loss

2013-03-28 Thread Yunong Xiao (JIRA)
Yunong Xiao created ZOOKEEPER-1676: -- Summary: C client zookeeper_interest returning ZOK on Connection Loss Key: ZOOKEEPER-1676 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676 Project

Re: zookeeper_interest returning ZOK on Connection Loss

2013-03-28 Thread Yunong Xiao
On Mar 27, 2013, at 10:23 AM, Michi Mutsuzaki mi...@cs.stanford.edu wrote: Is there a open jira for this patch? I don't have any problem integrating this patch. Only thing I'd suggest is to not call the event ZOO_EXPIRED_SESSION_STATE (which should be triggered only by the server).

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-13 Thread Yunong Xiao
Michi -- On Nov 5, 2012, at 11:24 PM, Michi Mutsuzaki mi...@cs.stanford.edu wrote: On Mon, Nov 5, 2012 at 2:16 PM, Yunong Xiao yjx...@gmail.com wrote: What happens if the server is offline? In the scenario you described, select() will never succeed, and zookeeper_interest() will never

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Yunong Xiao
, Nov 4, 2012 at 2:11 PM, Yunong Xiao yjx...@gmail.com wrote: I have a fairly simple single-threaded C client set up -- single-threaded because we are embedding zk in the node.js/libuv runtime -- which consists of the following algorithm: zookeeper_interest(); select(); // perform zookeeper api

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Yunong Xiao
need to keep calling zookeeper_interest() until select() succeeds. It would be great to have sample code / documentation. --Michi On Mon, Nov 5, 2012 at 1:19 PM, Yunong Xiao yjx...@gmail.com wrote: Michi, I don't think just returning error after checking SO_ERROR is sufficient here