Return-Path: X-Original-To: apmail-curator-user-archive@minotaur.apache.org Delivered-To: apmail-curator-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 332EA182DE for ; Tue, 1 Sep 2015 19:00:42 +0000 (UTC) Received: (qmail 13602 invoked by uid 500); 1 Sep 2015 19:00:42 -0000 Delivered-To: apmail-curator-user-archive@curator.apache.org Received: (qmail 13553 invoked by uid 500); 1 Sep 2015 19:00:42 -0000 Mailing-List: contact user-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@curator.apache.org Delivered-To: mailing list user@curator.apache.org Received: (qmail 13538 invoked by uid 99); 1 Sep 2015 19:00:41 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 19:00:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 854E71AB3D0 for ; Tue, 1 Sep 2015 19:00:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.9 X-Spam-Level: *** X-Spam-Status: No, score=3.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3KOWfTzhpzJz for ; Tue, 1 Sep 2015 19:00:33 +0000 (UTC) Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 1089C205E9 for ; Tue, 1 Sep 2015 19:00:33 +0000 (UTC) Received: by qkbp67 with SMTP id p67so55751077qkb.3 for ; Tue, 01 Sep 2015 12:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TgFVodrqyEG8Q9IL6GRyrL0s5WL3q2fFa6hdjnZunCo=; b=gq3JW4wpNlcgQDP/Nr+iCp1D7oDnXdHcmbYqcERcRoTVy78eIeDOCh3mo7bN2asFOQ w8xpDytuz5qwJxuh4nDGjaIfyfE8mYoFvwlj0K9RnfO655rYQpb4Sn++qgU+6Rixyfhy evr7dkdAPGci+yewMUPq1U571uyMG7fvPmhJXhEy4ndmDK5Iiz1sXpIjO5mVODiT/Znh qh63IyW7gAVM8EI/oFkYPgba9oJ/9kteXHNurnyN+8AqYjzLzoEO+95ak9TBsXZK7zjX 65jUXoZqNK0nDr7Iv5l4tZL++5szmCGtQj9l67vKqNEocwW5yE5M5SzS0MsKKkdJVRsw GO9A== MIME-Version: 1.0 X-Received: by 10.129.95.87 with SMTP id t84mr31350642ywb.29.1441134025801; Tue, 01 Sep 2015 12:00:25 -0700 (PDT) Received: by 10.37.66.147 with HTTP; Tue, 1 Sep 2015 12:00:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 Sep 2015 15:00:25 -0400 Message-ID: Subject: Re: NodeExistsException with Shared Value recipe in Curator From: Daniel Kashtan To: user@curator.apache.org Content-Type: multipart/alternative; boundary=001a1147f858ae8990051eb42902 --001a1147f858ae8990051eb42902 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I understand. I believe that despite my "checkExists()" calls, I am seeing one case where I still see an unexpected NodeExistsException. On Tue, Sep 1, 2015 at 2:14 PM, Gregory Chanan wrote= : > Just to reiterate Jordan's point -- given ZooKeeper's server semantics yo= u > cannot avoid NodeExistsExceptions in general. > > If ZooKeeper had different semantics -- for example state-based APIs > (e.g."this node should exist at the end of this call") rather than > action-based APIs (e.g. "create") -- it would be possible to avoid these > exceptions. Or if you could enforce single-writer at a time semantics. > > But given ZooKeeper's API choices, I believe most adminstrators simply > live with the exceptions or filter them out. > > Greg > > On Tue, Sep 1, 2015 at 7:19 AM, Daniel Kashtan > wrote: > >> I can definitely work around this problem by configuring my log4j file t= o >> WARN for the admins and then have a separate file with a verbose view se= t >> to INFO. >> >> What would be ideal is to have an option to call the .start() method wit= h >> a checkExists(). I am already doing using checkExists() in other parts o= f >> my code, but if I am using the Shared Value recipe I believe I cannot av= oid >> these exceptions being thrown in the server (please correct me if I am >> wrong though). >> >> Personally I can tolerate the NodeExists exceptions in the logs, but whe= n >> administrators are running the software in production and see exceptions= in >> the logs they think something is broken. >> >> On Mon, Aug 31, 2015 at 7:49 PM, Jordan Zimmerman < >> jordan@jordanzimmerman.com> wrote: >> >>> Why would this be needed? It adds an additional ZK call for no good >>> reason. If the node exists, the exception is thrown. In any event, even= if >>> checkExists() succeeds there=E2=80=99s a chance that another process ca= n create the >>> node before the create() call is made. So, it doesn=E2=80=99t do what y= ou want >>> anyway. >>> >>> -Jordan >>> >>> On August 31, 2015 at 2:46:09 PM, Cameron McKenzie ( >>> mckenzie.cam@gmail.com) wrote: >>> >>> Would it be possible in the future to have Curator have the option to >>> run a checkExists() before the .start() call on a recipe like Shared-Va= lue? >>> Is the extra overhead not worth the trouble? >>> >>> >> >> >> -- >> -Daniel >> > > --=20 -Daniel --001a1147f858ae8990051eb42902 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I understand.=C2=A0

I believe that desp= ite my "checkExists()" calls, I am seeing one case where I still = see an unexpected NodeExistsException.

On Tue, Sep 1, 2015 at 2:14 PM, Gregory Ch= anan <gchanan@cloudera.com> wrote:
Just to reiterate Jordan's point -- give= n ZooKeeper's server semantics you cannot avoid NodeExistsExceptions in= general.

If ZooKeeper had different semantics -- for ex= ample state-based APIs (e.g."this node should exist at the end of this= call") rather than action-based APIs (e.g. "create") -- it = would be possible to avoid these exceptions.=C2=A0 Or if you could enforce = single-writer at a time semantics.

But given ZooKe= eper's API choices, I believe most adminstrators simply live with the e= xceptions or filter them out.

Greg

On Tue, Sep 1, 2015 at 7:19 AM, Daniel Kashtan <djkas= htan@gmail.com> wrote:
I can definitely work around this problem by configuring my lo= g4j file to WARN for the admins and then have a separate file with a verbos= e view set to INFO.

What would be ideal is to have an op= tion to call the .start() method with a checkExists(). I am already doing u= sing checkExists() in other parts of my code, but if I am using the Shared = Value recipe I believe I cannot avoid these exceptions being thrown in the = server (please correct me if I am wrong though).=C2=A0

=
Personally I can tolerate the NodeExists exceptions in the logs, but w= hen administrators are running the software in production and see exception= s in the logs they think something is broken.

On Mon, Aug 31, 2015 at 7= :49 PM, Jordan Zimmerman <jordan@jordanzimmerman.com> wrote:
Why would this be needed? It adds an = additional ZK call for no good reason. If the node exists, the exception is= thrown. In any event, even if checkExists() succeeds there=E2=80=99s a cha= nce that another process can create the node before the create() call is ma= de. So, it doesn=E2=80=99t do what you want anyway.

-Jordan

On August 31, 2015 at 2:46:09 PM, Cameron McKenzie (mckenzie.cam@gmail.com) wrote:

Would it be possible in the future to = have Curator have the option to run a checkExists() before the .start() cal= l on a recipe like Shared-Value? Is the extra overhead not worth the troubl= e?




--
-Daniel




--
=
-Daniel
--001a1147f858ae8990051eb42902--