zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: More sync questions
Date Wed, 23 Nov 2011 17:01:35 GMT
On Thu, Nov 10, 2011 at 10:29 PM, Jordan Zimmerman
<jzimmerman@netflix.com> wrote:
> A while back I asked about sync() and got responses that said it's only needed for reads
(getData, getChildren). I was looking through the source and it appears that this does _not_
apply to exsists(). Am I reading that correctly? i.e. will exists() always return an accurate
(in terms of the leader) view of a node's metadata?

No, sync applies to any read. We call it "slow read" in some cases
because it forces the follower to get up to date with the leader.

Keep in mind that any read from any server is never "accurate" at
least in the sense that you likely mean it. e.g. the state of
leadership may change btw the time the server responds to your exists
call and the time it takes for TCP/OS to propagate the response to
your client.
http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing

Patrick

Mime
View raw message