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 DF7B8200B9D for ; Thu, 13 Oct 2016 21:06:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE3C2160AF9; Thu, 13 Oct 2016 19:06:21 +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 0B4F0160AD2 for ; Thu, 13 Oct 2016 21:06:20 +0200 (CEST) Received: (qmail 92654 invoked by uid 500); 13 Oct 2016 19:06:20 -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 92640 invoked by uid 99); 13 Oct 2016 19:06:20 -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; Thu, 13 Oct 2016 19:06:20 +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 BC5031A0390 for ; Thu, 13 Oct 2016 19:06:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=jordanzimmerman-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id rqTPYXR0Fs23 for ; Thu, 13 Oct 2016 19:06:18 +0000 (UTC) Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id BF9D15FAEE for ; Thu, 13 Oct 2016 19:06:17 +0000 (UTC) Received: by mail-vk0-f51.google.com with SMTP id b186so90089286vkb.1 for ; Thu, 13 Oct 2016 12:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jordanzimmerman-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=4184m8KpJSgTd8eqawjbpmXv4b4AX4eDjjTE+GnuJUU=; b=ZIFRjzOk0tnM8EuMXLMhiW0GbfdjmsFc4L7mvA0Npupjtw6G8/TUHrZV8MuzR28K/9 MLCTHO3Rwz8D5kmylH/P4OD010kNwFYxExztLohFGKxPl14rJlRWK3u+GvCqCNKyH93w TipAv0INmPP+CZnaHJ35giZcfhbDlCN1c1GIf2WDkC4YnoHkzHvV+t484hglhPUpm4rY JXYW66fZD/dBgzMyXVOKLx8IEz00KPObELMSKok2CbP5idSqzZtLg3E1MomSTcPR4rqS T59DBGZc4mfZJ6Xarj69TM6XL4gF7+SFGvF5kzNpXem4kRn+eIz7pIFDXPVtLkACuGjh sHFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=4184m8KpJSgTd8eqawjbpmXv4b4AX4eDjjTE+GnuJUU=; b=nKMbW3FbqAMsQrp00nzlLRKqYYdtXrwNdzfb3ehJm4K6KgNxeRq/oUjbaBbpm1l5e7 jwEWz49nClHx9EusJU/XR6v+m13wXvXMvy7RYzI1oYGDJ5CsrUUlbGCD1r/MdYPAkoNg LOEOmLkqolrF9cIyMFLHP8f8khhiekyFnyQaRB3FUMlLylJNhcjBdZwfbwGucqfLGjNJ DOxQ5FlT8/yPMMaZh9kM2s3WydgAsHHjBuw0drvKzp+2FWKBFgy0XsN1DDiP/hViIUT1 TvLdXkBoayjVzSa/hMhbnCPCjRTzb5DXGP/L1gXmwOUyWy4CRIDTfu6EeeXowE/jc1jy jJcg== X-Gm-Message-State: AA6/9RlU65D/tgY++zCwdqYo01bzs8vtNHxboey0E061+gHMg3bLHlpTDJrhhK+4e1FwGQ== X-Received: by 10.31.194.206 with SMTP id s197mr5834331vkf.101.1476385576352; Thu, 13 Oct 2016 12:06:16 -0700 (PDT) Received: from [10.0.1.4] ([186.72.10.77]) by smtp.gmail.com with ESMTPSA id y72sm5785531vky.9.2016.10.13.12.06.15 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Oct 2016 12:06:15 -0700 (PDT) From: Jordan Zimmerman Content-Type: multipart/alternative; boundary="Apple-Mail=_FFF3EF23-7237-4BE0-976D-1B64A5D7E30D" Message-Id: <5ECCD7A3-C86A-41D7-A141-CDD694C867D6@jordanzimmerman.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: whether curator does the sync action when using InterProcessMutex in framework? Date: Thu, 13 Oct 2016 14:06:14 -0500 References: To: user@curator.apache.org In-Reply-To: X-Mailer: Apple Mail (2.3124) archived-at: Thu, 13 Oct 2016 19:06:22 -0000 --Apple-Mail=_FFF3EF23-7237-4BE0-976D-1B64A5D7E30D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 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 --Apple-Mail=_FFF3EF23-7237-4BE0-976D-1B64A5D7E30D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
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

= --Apple-Mail=_FFF3EF23-7237-4BE0-976D-1B64A5D7E30D--