Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Node being there and not at the same time


Copy link to this message
-
Re: Node being there and not at the same time
In my experience helping people with ZK, this sort of thing is almost
always due to a bug in the client's code. If you want to share your code
with us we might be able to help, but I strongly suspect you're just not
seeing some edge case of the way you've written your code that is causing
this behavior.
However, it certainly wouldn't hurt to upgrade to the latest 3.3.X version,
if for no other reason than they do generally get better every stable
release.

C

On Thu, Aug 23, 2012 at 6:30 AM, Mattias Persson
<[EMAIL PROTECTED]>wrote:

> Hi,
>
> I've got a problem that I've seen at only a few occasions and which
> confuses me a bit. Basically I construct a ZooKeeper client (I'm running
> version 3.3.2) where there's a ZK quorum of size 3 running. I get a
> SyncConnected event in a Watcher of mine and in that watcher I do a
> get-or-create(-if-absent) behaviour where I first do a:
>
>   zooKeeper.getData( myPath, false, null );
>
> if that produces a NONODE code I'll try to create it with:
>
>   zooKeeper.create( myPath, smallByteArray, OPEN_ACL_UNSAFE, PERSISTENT );
>
> If that fails with NODEEXISTS code I'll just get it, assuming someone else
> made it before me. What I see from this getData call that I do after
> getting this NODEEXISTS code, which is the same as the first one btw, is
> that I'll get a NONODE code back. Given in this scenario is that I'm 100%
> certain that this node exists in the quorum at myPath in the first place
> even.
>
> Questions:
> 1) How can this happen?
> 2) Do I use ZooKeeper here in an improper way?
> 3) Will a later version fix any potential issue I might have hit?
> 4) What's the guarantees around the state of my ZooKeeper instance after a
> receive a SyncConnected event, is it fully synced with the master at that
> point, or will a call to sync() be necessary first?
>
> Best,
> Mattias
>
> --
> Mattias Persson, [[EMAIL PROTECTED]]
> Hacker, Neo Technology
> www.neotechnology.com
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB