Re: How to reestablish a session

2010-11-19 Thread Gustavo Niemeyer
> is_unrecoverable() means exactly that: the session is toast. nothing you do > will get it back. Ok, I was wondering about what exactly was unrecoverable indeed. > zookeeper_init is almost never used with a non-null client_id. the main use > case for it is crash recovery. i've rarely seen it use

Re: How to reestablish a session

2010-11-18 Thread Benjamin Reed
is_unrecoverable() means exactly that: the session is toast. nothing you do will get it back. zookeeper_init is almost never used with a non-null client_id. the main use case for it is crash recovery. i've rarely seen it used, but you can start a session, save off the client_id to disk, create

Re: How to reestablish a session

2010-11-18 Thread Gustavo Niemeyer
> why don't you let the client library do the move for you? Maybe there's no need to reestablish the session manually, but there are a few details in the API which give a hint this should be supported. The strongest one is that there's a parameter in zookeeper_init() to allow reestablishing an ex

Re: How to reestablish a session

2010-11-18 Thread Benjamin Reed
ginal Message- From: Gustavo Niemeyer [mailto:gust...@niemeyer.net] Sent: Thursday, November 18, 2010 10:16 AM To: ZooKeeper Users Subject: How to reestablish a session Greetings, As some of you already know, we've been using ZooKeeper at Canonical for a project we've been pushing

Re: How to reestablish a session

2010-11-18 Thread Benjamin Reed
ah i see. you are manually reestablishing the connection to B using the session identifier for the session with A. the problem is that when you call "close" on a session, it kills the session. we don't really have a way to close a handle without do that. (actually there is a test class that do

Re: How to reestablish a session

2010-11-18 Thread Gustavo Niemeyer
> Right now, if you have a partition between client and server A, I would not > expect > server A to see a clean close from the client, but one of the various > exceptions > that cause the socket to close. Please don't get me wrong, but I find it very funny to rely on the stability of a network

Re: How to reestablish a session

2010-11-18 Thread Gustavo Niemeyer
Hi Ben, > that quote is a bit out of context. it was with respect to a proposed > change. My point was just that the reasoning why you believed it wasn't a good approach to kill ephemerals in that old instance applies to the new cases I'm pointing out. I wasn't suggesting you agreed with my new

Re: How to reestablish a session

2010-11-18 Thread Benjamin Reed
that quote is a bit out of context. it was with respect to a proposed change. in your scenario can you explain step 4)? what are you closing? ben On 11/18/2010 07:16 AM, Gustavo Niemeyer wrote: Greetings, As some of you already know, we've been using ZooKeeper at Canonical for a project we'v

RE: How to reestablish a session

2010-11-18 Thread Fournier, Camille F. [Tech]
state of the session, and if the client connects elsewhere before the session timeout, the session will remain active. C -Original Message- From: Gustavo Niemeyer [mailto:gust...@niemeyer.net] Sent: Thursday, November 18, 2010 10:16 AM To: ZooKeeper Users Subject: How to reestablish a

How to reestablish a session

2010-11-18 Thread Gustavo Niemeyer
Greetings, As some of you already know, we've been using ZooKeeper at Canonical for a project we've been pushing (Ensemble, http://j.mp/dql6Fu). We've already written down txzookeeper (http://j.mp/d3Zx7z), to integrate the Python bindings with Twisted, and we're also in the process of creating a G