Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68552D977 for ; Mon, 17 Sep 2012 18:35:36 +0000 (UTC) Received: (qmail 59936 invoked by uid 500); 17 Sep 2012 18:35:35 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 59902 invoked by uid 500); 17 Sep 2012 18:35:35 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 59893 invoked by uid 99); 17 Sep 2012 18:35:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2012 18:35:35 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robin.bateboerop@userevents.com designates 65.55.88.12 as permitted sender) Received: from [65.55.88.12] (HELO tx2outboundpool.messaging.microsoft.com) (65.55.88.12) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2012 18:35:28 +0000 Received: from mail103-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE011.bigfish.com (10.9.40.31) with Microsoft SMTP Server id 14.1.225.23; Mon, 17 Sep 2012 18:35:06 +0000 Received: from mail103-tx2 (localhost [127.0.0.1]) by mail103-tx2-R.bigfish.com (Postfix) with ESMTP id 79995300273 for ; Mon, 17 Sep 2012 18:35:06 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.241.133;KIP:(null);UIP:(null);IPV:NLI;H:BL2PRD0411HT003.namprd04.prod.outlook.com;RD:none;EFVD:NLI X-SpamScore: 0 X-BigFish: PS0(zzzz1202h1d1ah1d2ahzz8275dhz2fh2a8h668h839h944hd25hf0ah107ah1220h1288h12a5h12a9h12bdh1155h) Received-SPF: pass (mail103-tx2: domain of userevents.com designates 157.56.241.133 as permitted sender) client-ip=157.56.241.133; envelope-from=robin.bateboerop@userevents.com; helo=BL2PRD0411HT003.namprd04.prod.outlook.com ;.outlook.com ; Received: from mail103-tx2 (localhost.localdomain [127.0.0.1]) by mail103-tx2 (MessageSwitch) id 1347906905127312_28239; Mon, 17 Sep 2012 18:35:05 +0000 (UTC) Received: from TX2EHSMHS039.bigfish.com (unknown [10.9.14.252]) by mail103-tx2.bigfish.com (Postfix) with ESMTP id 1B5142E0171 for ; Mon, 17 Sep 2012 18:35:05 +0000 (UTC) Received: from BL2PRD0411HT003.namprd04.prod.outlook.com (157.56.241.133) by TX2EHSMHS039.bigfish.com (10.9.99.139) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 17 Sep 2012 18:35:04 +0000 Received: from BL2PRD0411MB398.namprd04.prod.outlook.com ([169.254.12.225]) by BL2PRD0411HT003.namprd04.prod.outlook.com ([10.255.130.38]) with mapi id 14.16.0190.008; Mon, 17 Sep 2012 18:35:04 +0000 From: Robin Bate Boerop To: "user@zookeeper.apache.org" Subject: RE: question about lock recipe and watchers Thread-Topic: question about lock recipe and watchers Thread-Index: AQHNkuDB8paCTglw5kWIDaYqv7NXe5eK4TCAgAP03bqAAATrAIAABPtu Date: Mon, 17 Sep 2012 18:35:03 +0000 Message-ID: <6676F52799F9C44DBF8499B1692393D01D18D524@BL2PRD0411MB398.namprd04.prod.outlook.com> References: <5053D87F.5010302@mcs.anl.gov>, <6676F52799F9C44DBF8499B1692393D01D18D4D6@BL2PRD0411MB398.namprd04.prod.outlook.com>,<505768AA.8040708@mcs.anl.gov> In-Reply-To: <505768AA.8040708@mcs.anl.gov> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [99.251.196.55] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: userevents.com Phil, thank you for the experience report!=0A= =0A= Maybe the website should be updated with this suggestion...=0A= ________________________________________=0A= From: Phil Carns [carns@mcs.anl.gov]=0A= Sent: 17 September 2012 15:15=0A= To: user@zookeeper.apache.org=0A= Subject: Re: question about lock recipe and watchers=0A= =0A= I tried out Michi's suggestion over the weekend and it seems to be=0A= working great. I just used a one-byte get() in place of the exists()=0A= call recommended in the recipe. I'm actually using wget(), to be=0A= precise. The wget() either returns an error immediately (because the=0A= node has already been deleted) or else returns successfully and queues a=0A= watcher that triggers when the node is deleted later. There is no need=0A= to set a value in the node.=0A= =0A= =0A=