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 802E31810F for ; Tue, 1 Sep 2015 18:14:27 +0000 (UTC) Received: (qmail 18952 invoked by uid 500); 1 Sep 2015 18:14:27 -0000 Delivered-To: apmail-curator-user-archive@curator.apache.org Received: (qmail 18906 invoked by uid 500); 1 Sep 2015 18:14:27 -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 18896 invoked by uid 99); 1 Sep 2015 18:14:27 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 18:14:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E813B18234F for ; Tue, 1 Sep 2015 18:14:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.001 X-Spam-Level: *** X-Spam-Status: No, score=3.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qbOVnz4peigH for ; Tue, 1 Sep 2015 18:14:13 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 6CC3942F2B for ; Tue, 1 Sep 2015 18:14:13 +0000 (UTC) Received: by ioii196 with SMTP id i196so10878699ioi.3 for ; Tue, 01 Sep 2015 11:14:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=xZWbuFnQb/R257WCDCpdylo+vUfqwSQ9h6FO6TP4DoA=; b=QIfMea/cCGl7MhNeq+Fvr+eOuETaHV8mKleisZ44MpG1AUgCgDH0gr3BgzsOhj3FUd gbvJq9r0dS0DFgyFjXj07MzgbDKKB9X6w0hVYryzOI2lTUv2OFZBASeEZCPXquQeCc6G yUoX2bNTgMh6Q/KRnpW9oyNFOaQIU5CacF5974gKyjyZLtLMRG6/VdDwuyWN8NAvdZ8B D/qvGXqtZaw7TlXR6eqGNNkhfczjn4dXH1Cno9Yk0394SfwSjLBf7xvyCyIETcUs1nL+ hAPscktDEuVkZLs7Bty9kdbNczkfcFFrVn1+rRhI2qAphBuxFiHc+xw78spXjUYloRAB IBLw== X-Gm-Message-State: ALoCoQlptKv1H5f37v8akTDqjnsFGpazifvv/wDXtOG/BVgMEy21FSlUplNrqJbrxQI4g0JDYVZA MIME-Version: 1.0 X-Received: by 10.107.154.212 with SMTP id c203mr11106750ioe.123.1441131252907; Tue, 01 Sep 2015 11:14:12 -0700 (PDT) Received: by 10.107.145.196 with HTTP; Tue, 1 Sep 2015 11:14:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 Sep 2015 11:14:12 -0700 Message-ID: Subject: Re: NodeExistsException with Shared Value recipe in Curator From: Gregory Chanan To: user@curator.apache.org Content-Type: multipart/alternative; boundary=001a1140f5d867adbf051eb384cc --001a1140f5d867adbf051eb384cc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Just to reiterate Jordan's point -- given ZooKeeper's server semantics you 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 to > WARN for the admins and then have a separate file with a verbose view set > to INFO. > > What would be ideal is to have an option to call the .start() method with > a checkExists(). I am already doing using checkExists() in other parts of > my code, but if I am using the Shared Value recipe I believe I cannot avo= id > 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 when > 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 can= create the >> node before the create() call is made. So, it doesn=E2=80=99t do what yo= u 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 ru= n >> a checkExists() before the .start() call on a recipe like Shared-Value? = Is >> the extra overhead not worth the trouble? >> >> > > > -- > -Daniel > --001a1140f5d867adbf051eb384cc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Just to reiterate Jordan's point -- given ZooKeeper= 9;s server semantics you cannot avoid NodeExistsExceptions in general.
=
If ZooKeeper had different semantics -- for example state-ba= sed APIs (e.g."this node should exist at the end of this call") r= ather than action-based APIs (e.g. "create") -- it would be possi= ble to avoid these exceptions.=C2=A0 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 f= ilter them out.

Greg

On Tue, Sep 1, 2015 at 7:19 AM, Dan= iel Kashtan <djkashtan@gmail.com> wrote:
I can definitely work around this problem= by configuring my log4j file to WARN for the admins and then have a separa= te file with a verbose view set to INFO.

What would be i= deal is to have an option to call the .start() method with a checkExists().= I am already doing using 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 exceptio= ns in the logs, but when administrators are running the software in product= ion and see exceptions in the logs they think something is broken.

On Mon, Aug 31, 2015 at 7:49 PM, Jordan Zimmerman <jorda= n@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 checkExist= s() succeeds there=E2=80=99s a chance that another process can create the n= ode before the create() call is made. So, it doesn=E2=80=99t do what you wa= nt anyway.

-Jordan
<= span>

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

Would= it be possible in the future to have Curator have the option to run a chec= kExists() before the .start() call on a recipe like Shared-Value? Is the ex= tra overhead not worth the trouble?




--
-Daniel<= /div>

--001a1140f5d867adbf051eb384cc--