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 230E518009 for ; Tue, 4 Aug 2015 10:49:52 +0000 (UTC) Received: (qmail 50677 invoked by uid 500); 4 Aug 2015 10:49:51 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 50613 invoked by uid 500); 4 Aug 2015 10:49:51 -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 50601 invoked by uid 99); 4 Aug 2015 10:49:51 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 10:49:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ADD66199E67 for ; Tue, 4 Aug 2015 10:49:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7pGfVm5Xiayg for ; Tue, 4 Aug 2015 10:49:49 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 5BD762100B for ; Tue, 4 Aug 2015 10:49:49 +0000 (UTC) Received: by wicgj17 with SMTP id gj17so144370909wic.1 for ; Tue, 04 Aug 2015 03:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=YF2WU1t8DWGa5HhIoq2w0NvToTvFFfA8bs4lSjFOVF4=; b=KxM7ECFwHxfuU2GfcxBLZfqzdQBwY9CgK6HzU2ZNR+dmaD4O8nrZaeC93U7c87ZCCg 5lZJEIU7s5GO0w3FDADEs2pQQ6bTPxmIKpEw4VPPlYnBsked1eFPQjC1/tIU1LuN6hWm fqUSN2K03gr8XIERIkQw7Q6rfzXth6N0iHZg4ch3iIHCZ7SKoQkzTY3/a2OHAnwynwat P6BDhbljf3iiRsfosWejHcyoBw4t6xixOHEBee8jaZAGSBXnrQufVnNysJDaYmHeiMgZ gRb3zBfK7Yy41D16CDosO/bzHDZtssT+qYNKLjadihqz5ZcUohmInF6dWnvQtcc5xCyt HJTw== MIME-Version: 1.0 X-Received: by 10.194.171.9 with SMTP id aq9mr7207226wjc.30.1438685342806; Tue, 04 Aug 2015 03:49:02 -0700 (PDT) Received: by 10.27.179.232 with HTTP; Tue, 4 Aug 2015 03:49:02 -0700 (PDT) In-Reply-To: <2015080414393275398766@baidu.com> References: <2015080414393275398766@baidu.com> Date: Tue, 4 Aug 2015 16:19:02 +0530 Message-ID: Subject: Re: Doubts about libzookeeper From: Lokesh Shrivastava To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=089e011608a0cd3d71051c7a0805 --089e011608a0cd3d71051c7a0805 Content-Type: text/plain; charset=UTF-8 I think it depends on whether your request reaches zkserver-1 and whether it is able to send the request to quorum leader. Considering that "delete /path" request has reached the quorum leader then following may happen 1. Quorum leader has forwarded request to zkserver-2 for "delete /path". 2. If your client connects to "zkserver-2" after step 1 is executed (get /path). Then your "/path" will not be available. 3. If your client connects to "zkserver-2" before step1 is executed (get /path) then your "/path" would be available and after some time your path would not be available (after zkserver-2 is synched with the leader) Others can correct me if this is not how it works. Thanks. Lokesh On 4 August 2015 at 12:09, liangdong01@baidu.com wrote: > Hi, > I'm thinking about a program desgin with libzookeeper, here is my > doubts: > > 1) first, I connnect to zkserver-1, and there exists the path "/path". > 2) I sends "delete /path", the request reaches(may not, i don't know > about that) zkserver-1 and dont't know whether this effected, and then lost > connection before response returns. > 3) reconnect the same session to zkserver-2, and I sends "get /path". > > which one will the "get /path" return possibly : > 1, "not exists" > 2, "exists" and "always exists" > 3, "exists" and "not exists" afterwards > > my biggist problem is wether the 3) will occur or not, thanks! > > > > > liangdong01@baidu.com > --089e011608a0cd3d71051c7a0805--