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 EB80061FB for ; Wed, 1 Jun 2011 22:14:48 +0000 (UTC) Received: (qmail 21882 invoked by uid 500); 1 Jun 2011 22:14:48 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 21856 invoked by uid 500); 1 Jun 2011 22:14:48 -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 21838 invoked by uid 99); 1 Jun 2011 22:14:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 22:14:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of junrao@gmail.com designates 209.85.212.42 as permitted sender) Received: from [209.85.212.42] (HELO mail-vw0-f42.google.com) (209.85.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2011 22:14:42 +0000 Received: by vwl1 with SMTP id 1so278969vwl.15 for ; Wed, 01 Jun 2011 15:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=cdguznNeivFicX3gOQoyyjXpfmXhoiisjpp4JSSHE2g=; b=GX7MSCJoeDovt8w8YXkB1I8YWxguPlSnSy8784RSykFda07poXnId7qg1gxMVfHlJ3 8thuqaD0eLft4FyUlagAoBkBq5ZS8wv9zhLXNtzkGoXdBqGpWYWzJGwKCyPX4jCHDF08 60MyrCllEoplcbTMhO8WeKH1FiFI9BsH2UnsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Rt0oAiw21NKr3RsEv/bN/Qp7lqTmBlfpI4Hlp6dru7QN8C4o09M90GGCRFUFcZUUrt oufgM2gK4lvWKkfmW9mRDBEy95Any2BdGspdD7Mc3w4y3M1vPlrkr6k51eFmfzovwJr9 cLf2o1aAGEwqqDdES/KTOuPbbcE50YPmZo+bc= MIME-Version: 1.0 Received: by 10.52.76.197 with SMTP id m5mr2901593vdw.308.1306966461123; Wed, 01 Jun 2011 15:14:21 -0700 (PDT) Received: by 10.52.109.202 with HTTP; Wed, 1 Jun 2011 15:14:21 -0700 (PDT) In-Reply-To: <69D3016305F9084FBD2C4A0DF189BD5C176CE33248@GSCMAMP02EX.firmwide.corp.gs.com> References: <69D3016305F9084FBD2C4A0DF189BD5C176CE33248@GSCMAMP02EX.firmwide.corp.gs.com> Date: Wed, 1 Jun 2011 15:14:21 -0700 Message-ID: Subject: Re: lost ZK events across datacenters From: Jun Rao To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=bcaec501604da60dde04a4add77b X-Virus-Checked: Checked by ClamAV on apache.org --bcaec501604da60dde04a4add77b Content-Type: text/plain; charset=ISO-8859-1 All my clients were on different machines. 2 of them got the watcher fired about the same time. The third one never got the watcher triggered. Thanks, Jun On Wed, Jun 1, 2011 at 2:18 PM, Fournier, Camille F. [Tech] < Camille.Fournier@gs.com> wrote: > All clients are in different processes? > I've used zkclient and haven't seen any problems, but I haven't hammered it > too hard yet. I took a long look at the code and didn't see any errors but > there could always be something very subtle. > > -----Original Message----- > From: Jun Rao [mailto:junrao@gmail.com] > Sent: Wednesday, June 01, 2011 4:09 PM > To: user@zookeeper.apache.org > Subject: Re: lost ZK events across datacenters > > I am using the zkclient package ( > https://github.com/sgroschupf/zkclient.git). > The watcher code seems reasonable. Basically, each watcher event is first > added to a queue. A separate event thread dequeues each event and reads the > children of a path (which re-registers the watcher) and invokes the > registered listener. > > Anybody knows any issues in zkclient? > > Thanks, > > Jun > > On Wed, Jun 1, 2011 at 12:04 PM, Ted Dunning > wrote: > > > This is most commonly due, in my own history of programming errors, to > > writing code that has a race window in it. It is conceivable that cross > > data-center operation would make such a race more of a problem. > > > > Can you say a bit about your code? Did you make sure to use standard > > idioms > > as opposed to setting the watch in a different call from reading the > data? > > > > On Wed, Jun 1, 2011 at 11:40 AM, Jun Rao wrote: > > > > > Hi, > > > > > > I have a setup where multiple ZK clients are sitting in a different > > > datacenter from the ZK server. All clients registered the same child > > > watcher > > > on a path. However, when the children of the path changed, the watcher > on > > 1 > > > of the clients didn't fire. This seems to have happened a couple of > times > > > to > > > me. I am using ZK 3.3.3. Has anyone used ZK in a cross datacenter setup > > and > > > seen problems like that before? > > > > > > Thanks, > > > > > > Jun > > > > > > --bcaec501604da60dde04a4add77b--