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

2016-09-03 Thread Rakesh R (JIRA)
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rakesh R updated ZOOKEEPER-1676: Fix Version/s: (was: 3.5.2) > C client zookeeper_interest returning ZOK on Connection L

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

2016-09-03 Thread Rakesh R (JIRA)
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rakesh R updated ZOOKEEPER-1676: Fix Version/s: (was: 3.4.9) > C client zookeeper_interest returning ZOK on Connection L

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

2016-05-22 Thread Flavio Junqueira (JIRA)
and document it. > C client zookeeper_interest returning ZOK on Connection Loss > > > Key: ZOOKEEPER-1676 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676 >

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

2016-05-22 Thread Michael Han (JIRA)
ZOOKEEPER-2431 and ZOOKEEPER-2432 as a follow up to improve documentation. > C client zookeeper_interest returning ZOK on Connection Loss > > > Key: ZOOKEEPER-1676 > URL: https://issues.

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

2016-05-22 Thread Michael Han (JIRA)
ent zookeeper_interest returning ZOK on Connection Loss > > > Key: ZOOKEEPER-1676 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676 > Project: ZooKeeper >

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

2016-05-22 Thread Flavio Junqueira (JIRA)
/master.c > C client zookeeper_interest returning ZOK on Connection Loss > > > Key: ZOOKEEPER-1676 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676 >

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

2016-05-21 Thread Michael Han (JIRA)
, zookeeper_interest will return OK when the server is dead). Maybe we should add some documentations on the zookeeper_interest to indicate the return code of it should NOT be used for deciding connection status between client and server. > C client zookeeper_interest returning ZOK on Connection L

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

2016-05-20 Thread Flavio Junqueira (JIRA)
this for an example: https://github.com/apache/zookeeper/blob/trunk/src/c/src/cli.c I could use a second pair of eyes to confirm this, perhaps [~yunong] if still around. > C client zookeeper_interest returning ZOK on Connection L

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

2014-04-29 Thread Flavio Junqueira (JIRA)
zookeeper_interest returning ZOK on Connection Loss Key: ZOOKEEPER-1676 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676 Project: ZooKeeper Issue Type: Bug Components: c

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

2014-04-25 Thread Flavio Junqueira (JIRA)
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Flavio Junqueira updated ZOOKEEPER-1676: Priority: Blocker (was: Critical) C client zookeeper_interest returning ZOK

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

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

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

2013-10-03 Thread Patrick Hunt (JIRA)
an important one to fix, can you submit a patch per Michi's comment? C client zookeeper_interest returning ZOK on Connection Loss Key: ZOOKEEPER-1676 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1676

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

2013-04-20 Thread Michi Mutsuzaki (JIRA)
for the patch. Could you please upload your patch here? This page describes how to submit patches: http://wiki.apache.org/hadoop/ZooKeeper/HowToContribute Thanks! --Michi C client zookeeper_interest returning ZOK on Connection Loss

Re: zookeeper_interest returning ZOK on Connection Loss

2013-04-09 Thread Michi Mutsuzaki
Hi Yunong, I haven't had a chance to review your patch yet. I think I'll have some time this weekend. Thanks! --Michi On Mon, Apr 8, 2013 at 7:14 PM, Yunong Xiao yun...@joyent.com wrote: On Mar 27, 2013, at 10:49 AM, Marshall McMullen marshall.mcmul...@gmail.com wrote: We already have a

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

2013-03-27 Thread Anthony Barré
I would like to reopen this thread. The fact that no event ZOO_EXPIRED_SESSION_STATE is triggered after a certain amount of time when the server is offline is a serious problem. In my company, we also using the c client in a single thread (as part of the node-zookeeper module) but we decided to

Re: zookeeper_interest returning ZOK on Connection Loss

2013-03-27 Thread Michi Mutsuzaki
Hi Anthony, 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). --Michi On Wed, Mar 27, 2013 at 2:41 AM, Anthony Barré a...@fasterize.com

Re: zookeeper_interest returning ZOK on Connection Loss

2013-03-27 Thread Marshall McMullen
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 for this patch? I don't have any problem integrating this patch. Only thing I'd suggest

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 Michi Mutsuzaki
Hi Yunong, Yes, this looks like a bug. The problem is that the C client is not handling the case when connect() returns EINPROGRESS or EWOULDBLOCK and eventually fails. I think the right fix is to check SO_ERROR after the socket becomes writable. Please go ahead and open a jira. Thanks! --Michi

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Yunong Xiao
Michi, I don't think just returning error after checking SO_ERROR is sufficient here, since this indicates connection loss but not session expiration. The client could still connect to a different zk server on future iterations of zookeeper_interest(), which will not occur if we return error. I

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Michi Mutsuzaki
Hi Yunong, Zookeeper client shouldn't return ZOO_EXPIRED_SESSION_STATE unless the server tells the client the session is expired. Otherwise the client might think the session is expired when it isn't. In case of the single-threaded client, it looks like you need to keep calling

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Yunong Xiao
Hi Michi, Otherwise the client might think the session is expired when it isn't. In case of the single-threaded client, it looks like you need to keep calling zookeeper_interest() until select() succeeds. What happens if the server is offline? In the scenario you described, select() will

Re: zookeeper_interest returning ZOK on Connection Loss

2012-11-05 Thread Michi Mutsuzaki
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 inform the upstream consumer that the server is down. That's the crux of the problem here,