Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B3CCC200BAE for ; Fri, 14 Oct 2016 05:13:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B25CA160AE4; Fri, 14 Oct 2016 03:13:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A694D160AF6 for ; Fri, 14 Oct 2016 05:13:51 +0200 (CEST) Received: (qmail 45596 invoked by uid 500); 14 Oct 2016 03:13:50 -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 45533 invoked by uid 99); 14 Oct 2016 03:13:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 03:13:43 +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 41BE71A010B for ; Fri, 14 Oct 2016 03:13:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-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-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id m6qkCfSZgBRF for ; Fri, 14 Oct 2016 03:13:42 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E6E625F576 for ; Fri, 14 Oct 2016 03:13:41 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id qn10so43453463pac.2 for ; Thu, 13 Oct 2016 20:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :thread-index:content-language; bh=MXzg5rNO7AnjLk+NDxOz68r9S8nCdh7ylQOA30AysBs=; b=hwuS0Zldn3VYBn2w9mug0WmjKqAGPfnDil/uY6FKWjmAcE15tnv2ACHvuLZ37R3NSz RvpLWkkMJD96XlE5u/ZxRagUvOwuL4tzZ3zYEH3vkXJSUc3uM6enemlaPCDoi50ilIl+ /cphLxWvMFo+I9Zw6CxoO84lwPccMH3vY19opLoGhwYYcmSBXY40cdTUik1p8cwu9Rrw 5yevuZlVkyeTMVj+i4eVvoBZ3sW4Y/MiOpPXzdiiZ8SUhFNctHvBV6kCsMvw0sRXwXT1 xzY1xxieGVG6GnL7Qp950pR979ckYWLuqSleBFyQwv6SYu3syDpN1E0qSOR8YOaeDwsO 3/MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:thread-index:content-language; bh=MXzg5rNO7AnjLk+NDxOz68r9S8nCdh7ylQOA30AysBs=; b=IIJShBGdyRbpMrTppCDT7GlhTBn97RJqqrb7RrWGOPZF9icRueqku213QMXVXUMdbE 1hlI+eutJDs+/jlHc9Rfu/65efSbrxQ8V4ad/jZ3k5qGqFcgb05Gn7VDQYO1AwbkcHQ6 3SgoSsCl9A+UOYOLkjFFSv0c4KlOR181RMVamXOWgzS3pRbPcN9uZi0ve8wIyVmWzBCH QZGiXOR5hAzkZWj7s7EJnxtZjV4KWWJefKPyPhrFblaTjk9wqWDmndJBHuOr8ub6gGHm LpwkgJhhmK3gmblhAyGw36mpEWu5MPpQDVZUJm/041BO1rrvUJLKhTeVtblEXc++AjLG BtDw== X-Gm-Message-State: AA6/9RkQDw1ySubig5kwioYLib7geP0XGFkWmh2BN+5w7ZW7A1LW+w2rI8J1jbvko6lOzg== X-Received: by 10.66.122.239 with SMTP id lv15mr12356340pab.192.1476414820820; Thu, 13 Oct 2016 20:13:40 -0700 (PDT) Received: from Sammy ([106.38.61.188]) by smtp.gmail.com with ESMTPSA id p88sm22699551pfi.51.2016.10.13.20.13.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Oct 2016 20:13:40 -0700 (PDT) From: "sammy" To: References: <5ECCD7A3-C86A-41D7-A141-CDD694C867D6@jordanzimmerman.com> In-Reply-To: <5ECCD7A3-C86A-41D7-A141-CDD694C867D6@jordanzimmerman.com> Subject: =?UTF-8?Q?=E7=AD=94=E5=A4=8D:_whether_curator_does_the_syn?= =?UTF-8?Q?c_action_when_using_InterProcess?= =?UTF-8?Q?Mutex_in_framework=3F?= Date: Fri, 14 Oct 2016 11:13:28 +0800 Message-ID: <004801d225c8$f5acb8b0$e1062a10$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0049_01D2260C.03D15840" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQEqGDjStrkC05UvSdo5vm8Rl+IUGAHxXRm7oefTIgA= Content-Language: zh-cn archived-at: Fri, 14 Oct 2016 03:13:52 -0000 This is a multipart message in MIME format. ------=_NextPart_000_0049_01D2260C.03D15840 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, I use InterProcessMutex. Thanks a lot for your explanation=EF=BC=81 = :) =20 =20 =E5=8F=91=E4=BB=B6=E4=BA=BA: Jordan Zimmerman = [mailto:jordan@jordanzimmerman.com]=20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2016=E5=B9=B410=E6=9C=8814=E6=97=A5 =E6=98=9F=E6=9C=9F=E4=BA=94 3:06 =E6=94=B6=E4=BB=B6=E4=BA=BA: user@curator.apache.org =E4=B8=BB=E9=A2=98: Re: whether curator does the sync action when using = InterProcessMutex in framework? =20 Are you using Curator=E2=80=99s InterProcessMutex? If so, then you = don=E2=80=99t need to worry about sync. syncs are implied in every write = operation in ZooKeeper. There=E2=80=99s almost never a reason to = manually do a sync. =20 -Jordan =20 On Oct 13, 2016, at 4:47 AM, liusammy > wrote: =20 Hi guys, =20 as you know, zk has feature that write action is confirm after majority = of zk nodes successfully write. To read data, client needs to send sync = request to zk cluster node then get the newest data. =20 currently I use curator to do distributed lock framework. =20 I wonder whether or not curator does the =E2=80=9Csync=E2=80=9D action = before trying to lock a znode? Please point out my misunderstanding. =20 thanks a lot! =E2=80=8B =20 ------=_NextPart_000_0049_01D2260C.03D15840 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Yes, I use InterProcessMutex. Thanks a lot = for your explanation=EF=BC=81 J

 

 

=E5=8F=91=E4=BB= =B6=E4=BA=BA: Jordan = Zimmerman [mailto:jordan@jordanzimmerman.com]
=E5=8F=91=E9=80= =81=E6=97=B6=E9=97=B4: = 2016=E5=B9=B410=E6=9C=8814=E6=97=A5 = =E6=98=9F=E6=9C=9F=E4=BA=94 = 3:06
=E6=94=B6=E4=BB=B6=E4=BA=BA: = user@curator.apache.org
=E4=B8=BB=E9=A2=98: Re: whether curator does = the sync action when using InterProcessMutex in = framework?

 

Are you using Curator=E2=80=99s = InterProcessMutex? If so, then you don=E2=80=99t need to worry about = sync. syncs are implied in every write operation in ZooKeeper. = There=E2=80=99s almost never a reason to manually do a = sync.

 

-Jordan

 

On Oct 13, 2016, at 4:47 AM, = liusammy <buptsam@gmail.com> = wrote:

 

Hi = guys,

 

as you know, zk = has feature that write action is confirm after majority of zk nodes = successfully write. To read data, client needs to send sync request to = zk cluster node then get the newest = data.

 

currently I use = curator to do distributed lock = framework.

 

I wonder = whether or not curator does the =E2=80=9Csync=E2=80=9D action = before trying to lock a znode? Please point out my = misunderstanding.

 

thanks a = lot!
=E2=80=8B

 

------=_NextPart_000_0049_01D2260C.03D15840--