Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@locus.apache.org Received: (qmail 98200 invoked from network); 12 Dec 2008 19:11:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2008 19:11:26 -0000 Received: (qmail 54088 invoked by uid 500); 12 Dec 2008 19:11:39 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 54075 invoked by uid 500); 12 Dec 2008 19:11:38 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 54060 invoked by uid 99); 12 Dec 2008 19:11:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2008 11:11:38 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [207.126.228.149] (HELO rsmtp1.corp.yahoo.com) (207.126.228.149) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2008 19:11:23 +0000 Received: from [172.21.148.49] (wlanvpn-mc2e-246-49.corp.yahoo.com [172.21.148.49]) (authenticated bits=0) by rsmtp1.corp.yahoo.com (8.13.8/8.13.8/y.rout) with ESMTP id mBCJB11o061493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Dec 2008 11:11:01 -0800 (PST) Message-ID: <4942B745.5060608@apache.org> Date: Fri, 12 Dec 2008 11:11:01 -0800 From: Patrick Hunt User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: zookeeper-user@hadoop.apache.org, aching@yahoo-inc.com Subject: Re: zoo_set() version question References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Avery Ching wrote: > If zoo_set() completes successfully with version != -1, can we assume that > version -> version + 1 for this znode? If not, is there a way for the user > to get the version of the successfully completed zoo_set() operation? You shouldn't rely on this, it may work, but it's not part of the contract. Also, nothing says that some other client won't change the node immediately after you change it. You can access the version using zoo_exists or zoo_get - specifically the "struct Stat stat" argument of either of those methods contains a "version" member. Patrick