zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pramod Srinivasan <pra...@juniper.net>
Subject Re: behavior of ephemeral nodes
Date Wed, 02 May 2018 19:21:56 GMT
Yes, I am using the C library.

On 5/2/18, 10:18 AM, "Jordan Zimmerman" <jordan@jordanzimmerman.com> wrote:

    This is less a question of ephemeral node behavior and more a question on how to properly
watch ZNodes. Unfortunately I don't know the C library at all (it looks like that's what you're
using). I can only say that writing code that correctly watches a ZNode is not trivial. Of
course, there may be a bug in the C lib - I know it's not maintained to the same level as
the Java lib.
    > On May 2, 2018, at 12:11 PM, Pramod Srinivasan <pramod@juniper.net> wrote:
    > any thoughts on this?
    > On 5/1/18, 1:43 PM, "Pramod Srinivasan" <pramod@juniper.net> wrote:
    >    Hello Everyone,
    >    Can someone help me rationalize the behavior I see?
    >    1) Process A is watching node /a
    >    2) Process B and Process C add ephemeral nodes, say /a/b and /a/c
    >    3) Process B and Process C close their session and Process A gets a ZOO_CHILD_EVENT
event when b and c goes away.
    >    4) In the context of ZOO_CHILD_EVENT, Process A does a zoo_wget_children for “/a”
and find its empty, but when it tries to delete “/a”, it finds that it is not empty and
zoo_wget_children again returns no children.
    >    How can get_children return no children for a znode and a remove of the znode
fail with not empty? It looks like there is a relation with ephemeral nodes and Follower/Leader
behavior, don’t understand this enough to make sense
    >    Thanks,
    >    Pramod

View raw message