zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Harrigan <harrigan.matt...@gmail.com>
Subject Re: Using zookeeper to track started and complete tasks
Date Sat, 06 Feb 2016 00:07:51 GMT
The connection loss issue is really more of a tangent I inadvertently got
started.  My question relates to the guarantees zookeeper makes.  Under any
circumstance, can multiple clients create the same znode?  Here I am
talking about regular znodes, not ephemeral.  Said more formally, if N
clients simultaneously attempt to create the same znode (same path), will 0
or 1 clients return successfully while the other clients either lose
connection or throw a NodeExistsError?  I suspect zookeeper does honor that
guarantee but I don't see it mentioned here
My stackoverflow post was more complete than my email, I apologize for that.

On Fri, Feb 5, 2016 at 6:15 PM, Patrick Hunt <phunt@apache.org> wrote:

> See this item in the FAQ: "How should I handle the CONNECTION_LOSS
> error?". If I understand you correctly it answers your question.
> https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ
> Patrick
> On Fri, Feb 5, 2016 at 4:56 AM, Matthew Harrigan
> <harrigan.matthew@gmail.com> wrote:
> > Hello,
> >
> > I posted a question
> > <
> http://stackoverflow.com/questions/35205591/using-zookeeper-to-manage-tasks-which-are-in-process-or-have-been-processed
> >
> > to stack overflow.  Perhaps sending it to the zookeeper mailing list
> would
> > have been better.  Any help/comments would be greatly appreciated.
> >
> > After reading more about zookeeper, I suspect that one edge case which
> > could cause problems is if a worker loses connection after creating an
> > ephemeral node under started but before the client receives
> > acknowledgement.  That worker would not know whether it was actually
> > created or not, and in the meantime some other worker could create the
> same
> > node.  That would violate exactly once processing.  Perhaps uuid's could
> > help.  Maybe i could just restart the worker entirely if it loses
> > connection.  Anyways that is a pretty nasty edge case and I really don't
> > need anything bulletproof.
> >
> > Thank you

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message