You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by lgeretti <lu...@gmail.com> on 2012/03/19 08:25:18 UTC

Ephemeral deletion order

I noticed that if a client A creates several ephemeral znodes (either
sequential or not) under a common parent, and another client B has set
watches for all of them, when A disconnects I receive a seemingly arbitrary
(but constant for the same set of znodes) WatchEvent sequence. The sequence
is neither the same as that returned when listing the children, nor the
sequence of creation.
Can someone confirm me that the order of removal of ephemeral znodes is
practically undefined? (..at least in a user-sensible way; I imagine that
the order is driven by hashes in the persistence layer).

Thanks!

--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/Ephemeral-deletion-order-tp7384823p7384823.html
Sent from the zookeeper-user mailing list archive at Nabble.com.

Re: Ephemeral deletion order

Posted by Camille Fournier <ca...@apache.org>.
We associate ephemerals to the session id via a HashSet, so the
watches will be triggered in the order items are returned from the
HashSet, which is practically, undefined.

C

On Mon, Mar 19, 2012 at 3:25 AM, lgeretti <lu...@gmail.com> wrote:
> I noticed that if a client A creates several ephemeral znodes (either
> sequential or not) under a common parent, and another client B has set
> watches for all of them, when A disconnects I receive a seemingly arbitrary
> (but constant for the same set of znodes) WatchEvent sequence. The sequence
> is neither the same as that returned when listing the children, nor the
> sequence of creation.
> Can someone confirm me that the order of removal of ephemeral znodes is
> practically undefined? (..at least in a user-sensible way; I imagine that
> the order is driven by hashes in the persistence layer).
>
> Thanks!
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/Ephemeral-deletion-order-tp7384823p7384823.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.