Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 39054200D4A for ; Tue, 14 Nov 2017 04:04:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 37794160C07; Tue, 14 Nov 2017 03:04:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 58F68160BF3 for ; Tue, 14 Nov 2017 04:04:51 +0100 (CET) Received: (qmail 49121 invoked by uid 500); 14 Nov 2017 03:04:49 -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 48996 invoked by uid 99); 14 Nov 2017 03:04:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 03:04:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9AE70C802B; Tue, 14 Nov 2017 03:04:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.15 X-Spam-Level: X-Spam-Status: No, score=-0.15 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WE2RMY1n__uK; Tue, 14 Nov 2017 03:04:46 +0000 (UTC) Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 509BE60E85; Tue, 14 Nov 2017 03:04:45 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id a84so8450370pfl.0; Mon, 13 Nov 2017 19:04:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=xe2uzOZIZmOHJWIt1mLoxcpZeE8kIZH9hpJumk0pFKA=; b=pJMoGMoFeJPJbl2Wm5WToGfdCYMARQeSEdHrcUuHKe0A+Twh47F3OG4woxW1O0Yfji pvrS5CLp4CqjUC6V0vQDopqwOtyr7A9JHLf2YE+iBPzCRo7PDHkq6WKAq1DRBj90uPiF uJzW4nePkfeH0z9F4/8vH1s4fY8PWVdO1/WlgHUXLKtszJTu5Q4W6cutndK63uVfZsl3 W0wsFi38KRG54CATGRFTb/aH1rbA2vYa5pXqopS0YQG/k71CW5sVgboqiFOVTQvocPSB uGOdNQLepdo6V9K57yCY1QoLDSH+iDCMOiXGjWoAvWkD22GnL1NDoi6QgwlM4b36qnrk +8zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=xe2uzOZIZmOHJWIt1mLoxcpZeE8kIZH9hpJumk0pFKA=; b=IXFWJ+mYFDlGTAWs9eOrf9rIWdc2MlO0Rn6eYsjxqErXPVipPG25pZxIzEgPnTZog1 i7OvnEEaU/a0PtvaM+4zGS6OpryVcVJZ6qgWQetOqU/gH3lcWS0WzL4PHNTBZNHYemZ4 trsYheCezY9wGK00Iu5lpY5VyVSgGaWcf3XBpBiwbHqTWAB0eJOPtcoKSD8YNG5iPCDD rf/c/iRALQ/nROm3vTRjxOwDo5gW5v38bX6IAI25yNwmsw1mUjhKfIzMga47uDQVNCZu Zu3yN3oUsN1DbCrbOzovvsHCHMMhFZOr2XO8X0DpJs8aYsMPF+oKWqnT/Ozzrh2uiMaA xuWQ== X-Gm-Message-State: AJaThX5ZZRPLPDHqb+bob+wwzJWrr0L5syRyiV4Jv8Po3DMzVDX3e37t AcehWE1XAXRUyZb+Bs9OcjGdvvbiCrw= X-Google-Smtp-Source: AGs4zMZMGiQo+4ezKR5OP53KlQNqnhYLtjftjJI+U8JLFzrJ4QbLL28nTHT8c0xiETkd67dZXGpx7A== X-Received: by 10.101.65.69 with SMTP id x5mr10582505pgp.102.1510628683509; Mon, 13 Nov 2017 19:04:43 -0800 (PST) Received: from [10.18.60.112] ([104.192.108.9]) by smtp.gmail.com with ESMTPSA id s72sm16018052pgc.18.2017.11.13.19.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 19:04:43 -0800 (PST) From: baotiao Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_7B4A6E20-09EF-443A-BFFF-A5C2DE20BFC1" Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: how zookeeper promise FIFO client order Date: Tue, 14 Nov 2017 11:04:34 +0800 In-Reply-To: <1510618325.2966293.1171459416.240F2D1D@webmail.messagingengine.com> Cc: user@zookeeper.apache.org, afine@apache.org To: dev@zookeeper.apache.org References: <1510618325.2966293.1171459416.240F2D1D@webmail.messagingengine.com> X-Mailer: Apple Mail (2.3445.4.7) archived-at: Tue, 14 Nov 2017 03:04:52 -0000 --Apple-Mail=_7B4A6E20-09EF-443A-BFFF-A5C2DE20BFC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello Abraham right, exactly. my confusion is that the client FIFO order is for a client or only for a = tcp connection ---------------------------------------- =20 Github: https://github.com/baotiao Blog: http://baotiao.github.io/ Stackoverflow: http://stackoverflow.com/users/634415/baotiao=20 Linkedin: http://www.linkedin.com/profile/view?id=3D145231990 > On 14 Nov 2017, at 08:12, Abraham Fine wrote: >=20 > Hello- >=20 > My understanding is that the question is about the possibility of a = race > condition between two client requests. I would take a look at the > section "Order in the Presence of Connection Loss" in the "ZooKeeper: > Distributed Process Coordination" book for the best answer to this > question. >=20 > Thanks, > Abe >=20 > On Mon, Nov 13, 2017, at 06:17, Andor Molnar wrote: >> Hi baotiao, >>=20 >> First, requests are acknowledged back to the client once the leader >> accepted and written them in its transaction log, which guarantees = that >> in >> case of a crash, pending transactions can be processed on restart. >> Transactions IDs (zxid) are incremental and generated by the leader. >> Second, Zab guarantees that if the leader broadcast T and T' in that >> order, >> each server must commit T before committing T'. >>=20 >> With these 2 promises, I believe, that FIFO is guaranteed by = Zookeeper. >>=20 >> Would you please clarify that what do you mean by "set b=3D1 = operation is >> on >> the way"? >>=20 >> If "set b=3D1" is accepted by the leader, the client won't have to = resend >> it >> on reconnect. >>=20 >> Regards, >> Andor >>=20 >>=20 >> On Mon, Nov 13, 2017 at 5:01 AM, =E9=99=88=E5=AE=97=E5=BF=97 = wrote: >>=20 >>> I want to know in the following situation, how zookeeper promise = client >>> FIFO order. >>>=20 >>> the client sent three operation to server, set a =3D 1, set b =3D 1, = set ready >>> =3D true. >>>=20 >>> is it possible to this situation that the set a =3D 1 is process by = the >>> leader, then there is something wrong with this tcp connection, this = client >>> reconnect a new tcp connection to the leader, but the set b =3D 1 = operation >>> is on the way. then the client will use the new tcp connection to = sent set >>> ready =3D true operation. so the set a =3D 1 is operated, set b =3D = 1 is not and >>> set ready =3D true is operated too. >>>=20 >>> the question is how zab promise client FIFO order? >>>=20 >>> zab can resend all the operation that hasn't be replied from the = leader. >>> then in this situation, when the client reconnect to the leader, it = will >>> resent the operation set b =3D 1, set ready =3D true. >>>=20 >>> is this the way the zab used to primise FIFO order? >>>=20 >>> Thank you all >>>=20 >>> -- >>> --- >>> Blog: http://www.chenzongzhi.info >>> Twitter: https://twitter.com/baotiao = >>> Git: https://github.com/baotiao >>>=20 --Apple-Mail=_7B4A6E20-09EF-443A-BFFF-A5C2DE20BFC1--