From user-return-4664-apmail-zookeeper-user-archive=zookeeper.apache.org@zookeeper.apache.org Fri Mar 2 00:11:36 2012 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 9C33B992C for ; Fri, 2 Mar 2012 00:11:36 +0000 (UTC) Received: (qmail 20324 invoked by uid 500); 2 Mar 2012 00:11:36 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 20301 invoked by uid 500); 2 Mar 2012 00:11:36 -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 20291 invoked by uid 99); 2 Mar 2012 00:11:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 00:11:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of amirhkiani@gmail.com designates 209.85.160.42 as permitted sender) Received: from [209.85.160.42] (HELO mail-pw0-f42.google.com) (209.85.160.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 00:11:24 +0000 Received: by pbcun1 with SMTP id un1so500954pbc.15 for ; Thu, 01 Mar 2012 16:11:03 -0800 (PST) Received-SPF: pass (google.com: domain of amirhkiani@gmail.com designates 10.68.212.130 as permitted sender) client-ip=10.68.212.130; Authentication-Results: mr.google.com; spf=pass (google.com: domain of amirhkiani@gmail.com designates 10.68.212.130 as permitted sender) smtp.mail=amirhkiani@gmail.com; dkim=pass header.i=amirhkiani@gmail.com Received: from mr.google.com ([10.68.212.130]) by 10.68.212.130 with SMTP id nk2mr8720725pbc.69.1330647063616 (num_hops = 1); Thu, 01 Mar 2012 16:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:date:message-id:to:mime-version:x-mailer; bh=NfHthNsJFNSwACmeOnPFJDsSCYqcLqJSOnoAvIp2exY=; b=JS12exD5IariQ7F24rg7LY7bqrxUHNtuTbsyF3uBXsTAmS9afVo8CsAtKu7qJKq1MD q7YSfS7uvaCqsDHoWUG7770Zb/3S/YzoL3hn3okJE7IUOKdNwBAI3GAB5AXGtZhKDwML /x5d8hq3QdM06xeh/pckTRyOsSBPx7YxGcUN71TxkVoxtGp5+ifQCSwAPHArk8hWV7MJ 5yKSf+g5xMQpO5MCAKYwMVtXjuji1ZLzsI+J6p0xTn0OkHMcu5NQdP2wZjTmbSKUvPG6 NnxucV7B8n9pAK8mTghEQPj+AO9KAIjZDG20ysjc1YYGlwdYGQgaJLZ2taUM3eGgG4sD 7Swg== Received: by 10.68.212.130 with SMTP id nk2mr7205052pbc.69.1330647063563; Thu, 01 Mar 2012 16:11:03 -0800 (PST) Received: from amiroo.localnet (50-78-98-94-static.hfc.comcastbusiness.net. [50.78.98.94]) by mx.google.com with ESMTPS id z1sm3344990pbc.38.2012.03.01.16.11.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Mar 2012 16:11:02 -0800 (PST) From: Amirhossein Kiani Content-Type: multipart/alternative; boundary="Apple-Mail=_CC70E388-AFBD-4DA0-93EC-3E541BBD954A" Subject: Getting data after the watch Date: Thu, 1 Mar 2012 16:11:01 -0800 Message-Id: To: user@zookeeper.apache.org Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_CC70E388-AFBD-4DA0-93EC-3E541BBD954A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi ZooKeepers, I just recently had an issue about getting the a node's updated data = after the watch was actually fired. Being pretty confused, I read the = documentation page again and sure enough this has been stated: "A client will see a watch event for a znode it is watching before = seeing the new data that corresponds to that znode." http://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html Now, I'm confused about how a data watch could actually be useful... But = aside from that, is this statement also true about the node's list of = Children? I.e. are a node's children it's "data" too? Because if this is the case, wouldn't the recipe for barriers hang if it = gets the watch for a new node addition goes off and in: if (list.size() < size) { mutex.wait(); list.size() is still smaller than size? Or is this statement about watches only true for a data on the node? Many thanks, Amir --Apple-Mail=_CC70E388-AFBD-4DA0-93EC-3E541BBD954A--