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 8620F1820D for ; Fri, 28 Aug 2015 11:29:58 +0000 (UTC) Received: (qmail 7999 invoked by uid 500); 28 Aug 2015 11:29:57 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 7945 invoked by uid 500); 28 Aug 2015 11:29:57 -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 7931 invoked by uid 99); 28 Aug 2015 11:29:57 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2015 11:29:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CC333C0E10 for ; Fri, 28 Aug 2015 11:29:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.894 X-Spam-Level: ** X-Spam-Status: No, score=2.894 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RP_MATCHES_RCVD=-0.006, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=janestreet.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id yXazQ39jTuWz for ; Fri, 28 Aug 2015 11:29:43 +0000 (UTC) Received: from mxout4.mail.janestreet.com (mxout4.mail.janestreet.com [38.105.200.233]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 3D283255AC for ; Fri, 28 Aug 2015 11:29:43 +0000 (UTC) Received: from tot-qpr-mailcore2.delacy.com ([172.27.56.106] helo=tot-qpr-mailcore2) by mxout4.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1ZVHqi-0007iz-NX for user@zookeeper.apache.org; Fri, 28 Aug 2015 07:29:36 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore2 with JS-mailcore (0.1) (envelope-from ) id BV4EYg-AAAEHa-Vn; 2015-08-28 07:29:36.692445-04:00 Received: from mail-io0-f172.google.com ([209.85.223.172]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1ZVHqi-0004rB-K4 for user@zookeeper.apache.org; Fri, 28 Aug 2015 07:29:36 -0400 Received: by ioed140 with SMTP id d140so1933824ioe.2 for ; Fri, 28 Aug 2015 04:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=eWD6lZsUnK8tJwciO7nda6AcU6NcUBuT+eYCrzrrGK4=; b=JXfExNWZEbvNxrZ6nxwL0gUIh5FzltiPhrGhV5FuXwHnEhTgXutEIQN2sg+WjaJMLY W35F3zqHQeUtXtj/H5uGiP8ZXHXbt9gs7to6uFztXgDghc4zPVaiJbXm8YMMTYycXiuO m6CZwwFv/Q0qLGfbayQOoyG3ejbvmrxS8TYPs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=eWD6lZsUnK8tJwciO7nda6AcU6NcUBuT+eYCrzrrGK4=; b=fmKcExIN/zGH/hWKxkzyIYNdPTgNMcFnZyRnLnQ2w3LXSAm60EJX0Dfv1FPNuJ7lbN fwsS54VBvGxgmnSJutdX9Bn+A8Vj4LTVdG/cr7gZhMraaXrGtL2AiB/ug7bddqqVqdSR kh/u8n0oRXJx+pBcT1N00l5DeDkYgRxTYR1txx0neE80QIgYisonYtOKFH9jVmTi4c4m OgOLgBOjfIPurtN7O7VDGMbY5/ePe+bCnxgsWLGo2/naymLyATDzYy9EyDsYySE3X8lE EUI9ccOKlBHUDbjz/n2SOCst8ABMJPsn47jpDnux8fi6bxrrUzICa0HQ97RURl5stMWD QoPA== X-Gm-Message-State: ALoCoQm7wW6zXNFjJ1yl6O3saCfZPTC0p4LEt7RjQipBbOYeAkUmCdGOY/8X1CHt9p+DjKMP+9QtWnkK4yyHGp/Y9cNEM3DgMSBAlqvcItFNhMVfF/KtFKKU4sqVLgJOGaW52F0tfJHmImWTvl1IncbcJ1t+uNmYgQ== X-Received: by 10.107.10.139 with SMTP id 11mr12721660iok.117.1440761376268; Fri, 28 Aug 2015 04:29:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.10.139 with SMTP id 11mr12721639iok.117.1440761375926; Fri, 28 Aug 2015 04:29:35 -0700 (PDT) Received: by 10.107.140.14 with HTTP; Fri, 28 Aug 2015 04:29:35 -0700 (PDT) In-Reply-To: <6146868A-0AE7-4678-AF8A-5EC97366CC78@yahoo.com> References: <6146868A-0AE7-4678-AF8A-5EC97366CC78@yahoo.com> Date: Fri, 28 Aug 2015 12:29:35 +0100 Message-ID: Subject: Re: Get_children after create From: Robert Rosolek To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=001a113ec91604dc0a051e5d66dd X-JS-Processed-by: mailcore --001a113ec91604dc0a051e5d66dd Content-Type: text/plain; charset=UTF-8 I have found out what was causing the problem and, unsurprisingly, the bug was on our side. Thank you for your help. On Wed, Aug 26, 2015 at 1:35 PM, Flavio Junqueira < fpjunqueira@yahoo.com.invalid> wrote: > Hi Robert, > > If it is the same client that created the znode, then yes, it does read > its own writes. A different client may not read it immediately because we > propagate updates agreed upon to the replicas asynchronously. You could > watch the parents for changes, though, and have the client being notified > when the newly created child becomes visible for that client. > > -Flavio > > > On 26 Aug 2015, at 11:08, Robert Rosolek > wrote: > > > > To clarify more: in my program no-one is deleting this node in the > > meantime. Also the state of the zookeeper session is Connected all the > time. > > > > On Wed, Aug 26, 2015 at 10:03 AM, Robert Rosolek < > rrosolek@janestreet.com> > > wrote: > > > >> Hi, > >> > >> Sorry if this question was asked here before, but I couldn't find the > >> search functionality in the archives. > >> > >> My question is the following: after create operation is successful, am I > >> guaranteed to > >> see the new child when doing get_children on the parent? I have a > program, > >> that seems to be breaking because it makes this assumption. Looking at > the > >> lock recipe at > >> > https://github.com/apache/zookeeper/blob/trunk/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java > , > >> it seems this code does *not* make this assumption and simply keeps > >> retrying in a tight loop until it finds the child. > >> > >> Thank you, > >> Robert > >> > > --001a113ec91604dc0a051e5d66dd--