You will always have strict ordering of execution, but if you want to see the
results in a strict order you must use the async call.
Sent from my phone.
From: Stefan Groschupf <s...@101tec.com>
Sent: Monday, August 03, 2009 10:38 PM
To: firstname.lastname@example.org <email@example.com>
Subject: Re: exist return true before event comes in
Interesting, that basically means if I want strict order, I have to
use the async api?
Hadoop training and consulting
On Aug 3, 2009, at 8:10 PM, Benjamin Reed wrote:
> I assume you are calling the synchronous version of exists. The
> callbacks for both the watches and async calls are processed by a
> callback thread, so the ordering is strict. Synchronous call
> responses are not queued to the callback thread. (this allows you to
> make synchronous calls in callbacks without deadlocking.) thus the
> effect you are seeing may be due to a backed up callback queue and/
> or thread scheduling.
> Sent from my phone.
> -----Original Message-----
> From: Stefan Groschupf <s...@101tec.com>
> Sent: Monday, August 03, 2009 9:31 PM
> To: firstname.lastname@example.org <zookeeper-
> Subject: exist return true before event comes in
> I'm running into following problem writing a fasade for Zk Client
> 1.) Subscribe a watch via exist(path, true) for a path.
> 2.) Create a persistent node.
> 3.) Call exist and it returns true
> 4.) Zookeeper sends a NodeCreated event.
> I would expect that the client would get the NodeCreated event before
> exist returns true.
> Does anyone has a idea of a pattern that secures that exist return
> false, before the event is triggered?