You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Jamie Rothfeder <ja...@gmail.com> on 2011/09/29 03:10:00 UTC

Watches on a chrooted node go away on reconnect.

Hey All,

I'm running into a problem where watches on a chrooted path seem to go away
when a client disconnects from one server and reconnects to another (it may
happen on the same server, haven't tested this yet). If I don't use a
chrooted path, the watches behave correctly.

Here's what I do to reproduce this:

For a chrooted connection, say zookeeper01,zookeeper02,zookeeper03/foo do

1. Create a watch on node /path/to/node (absolute path is /foo/path/to/node)
2. Restart the server to which the client is connected. Client connects
another server in the ensemble.
3. Watches are gone.

If I enable debug logging on the client, I notice that there is a strange
watch triggered of type NodeDeleted which contains a truncated path to the
node (for the above example, it may look like h/to/node). This is not picked
up by any watches, of course, since no watches are registered to that path.

Zookeeper version is 3.3.1, and this is reproducible on multiple Linux
distros.

ZOOKEEPER-961 deals with a strange behavior on chrooted paths after a server
restart, but doesn't seem to match the symptoms I'm seeing.

Any ideas? I'm happy to provide more details.

Thanks,
Jamie