Your watch won't be triggered because you're not connected to ZK. On reconnection, watches need to be reset, so you wouldn't get an event until the ephemeral node is created / deleted again.
On Mon, Mar 16, 2015 at 9:02 AM, Churu Tang <[email protected]> wrote: > Hi, > > My concern is if the following events happen in sequence, will my watch > triggered? If my watch get triggered, does it happen on stage 3 or stage 4? > > 1. My zookeeper client created a ephemeral node. > 2. My zookeeper client add a watch for the exist of this ephemeral node. > 3. Due to network unstable, zookeeper client disconnected to the server > for 1 minutes. > During this time, ephemeral node will get deleted because of this > disconnect. > 4. My zookeeper client reconnect to the server successfully. > > Any help is highly appreciated! > > Cheers, > Churu > > >
