zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Rothfeder <jamie.rothfe...@gmail.com>
Subject Re: When to reestablish watches?
Date Tue, 27 Sep 2011 22:03:15 GMT
I'll check to see if the client is using the same session. Is this the
default behavior, or do I need to do something special to get it to happen?

Thanks,
Jamie

On Tue, Sep 27, 2011 at 5:55 PM, Kapil Thangavleu <kapil.foss@gmail.com>wrote:

> Excerpts from Jamie Rothfeder's message of Tue Sep 27 16:54:57 -0400 2011:
> > Hey All,
> >
> > I have a zookeeper client who is connected to a server in a zookeeper
> > ensemble. The client has created some watches, I can see these watches if
> I
> > run "echo wchp | nc <servername> <serverport>". When I shutdown that
> server,
> > the client will automatically connect to another server in the ensemble,
> > will receive WatchedEvent state:Disconnected and WatchedEvent
> > state:SyncConnected. However, the watches are not migrated to the new
> server
> > and are lost. Is this the expected behavior? I was under the impression
> that
> > watches are not removed on Disconnected and SyncConnected events, am I
> > wrong?
> >
> > Thanks,
> > Jamie
>
> As long as the client session is active, the watches should still be
> active. I
> have unit test against the txzk python client to this effect, fwiw.
>
>
> http://bazaar.launchpad.net/~juju/txzookeeper/trunk/view/head:/txzookeeper/tests/test_session.py#L73
>
> Perhaps your not client isn't reconnecting to the same session on the new
> server?
>
> hth,
>
> Kapil
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message