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 1142B200D4A for ; Tue, 14 Nov 2017 03:59:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0FAB4160C06; Tue, 14 Nov 2017 02:59:51 +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 2E8DB160BF3 for ; Tue, 14 Nov 2017 03:59:50 +0100 (CET) Received: (qmail 34153 invoked by uid 500); 14 Nov 2017 02:59: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 34141 invoked by uid 99); 14 Nov 2017 02:59:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 02:59:48 +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 9282618089D for ; Tue, 14 Nov 2017 02:59:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.63 X-Spam-Level: ** X-Spam-Status: No, score=2.63 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=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-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gf3CfO-q2KDi for ; Tue, 14 Nov 2017 02:59:43 +0000 (UTC) Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 36E2660E85 for ; Tue, 14 Nov 2017 02:59:43 +0000 (UTC) Received: by mail-pg0-f42.google.com with SMTP id l19so11683046pgo.2 for ; Mon, 13 Nov 2017 18:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=TMx82B44hGFk5AvRiZgXSuFJ+dlRj3rryy/9LddYr/g=; b=LQ3xg+Up4VqRJTlJeS+IrWkUILGm16F7PfqGCJUevQOO23TsEZ1WhFSl3o7Z8rKwv5 /4EZ+dbnDSDfIq+qf0brNKdTQXvrhl3Err+0GNyGFGaCkRNGcbCYn2w1JZCRDGakHzLU +1YKYBwJmOlwh7/KxCxClkEJKtazqNQw6qmOSeKu25AY8ukHCIDVrpznDOojCnX/Xj5Z L9ERrL6yIms3NUedRho4lvYJlmoLBHWaA2g67wLnRW4qaaiftzeMnPjP3/rJsrTuoCV9 szbNZUmIuw/POa7aUP2+1S0xsdQOHYV/1JiNyDlvardTG+8qFOZAdPSRd+E3oB7PEf9M VY8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=TMx82B44hGFk5AvRiZgXSuFJ+dlRj3rryy/9LddYr/g=; b=c4C968HWJvR62WgtNWI/D4+pLy3y2OGESQB2yLSnTZzub3dy/JUxXATY1woVWzMuuL DPrDkAbOcNC6rdfkpxfbK5uIRCNUCP/8RloNOuTDVimXWn7UrVKzhnsYkPDBo3MQFJTQ 3dCudViDcAE9L8ortr5axl4W74Pvf+lLr1KtaQwC4Pxk5f/39BzYPQNhU/kLuoSkSTra MoGP3XMytG3qbIVkiVen3NItXl9Yo+fvBjFQ8Zi14yyNEWKZ0ah5ZqRg7mDoCQEDjgA2 nmJQ0ilWK6KXaqrmDzG6U5HFkWRn/EoI7l14TYGdFByf4ROjCLpy+PYC1OaSysR8d2K/ xmtg== X-Gm-Message-State: AJaThX52oUk1MmbHinUY4AVKcY0VempoEXNRh5TbBOt5GlC99AfwdFne 7Bw9c7pmVibF+rodL9fBYonuTmuW X-Google-Smtp-Source: AGs4zMa13QYwadTjcwXUO4CDYO3WF11YmHPfr6J/zoZfMsUn5Q7BYlm5P8MPwl0uS8kfyh87w0CCHA== X-Received: by 10.101.96.68 with SMTP id b4mr10451245pgv.155.1510628381362; Mon, 13 Nov 2017 18:59:41 -0800 (PST) Received: from [10.18.60.112] ([104.192.108.10]) by smtp.gmail.com with ESMTPSA id 69sm1718935pfj.28.2017.11.13.18.59.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 18:59:40 -0800 (PST) From: baotiao Content-Type: multipart/alternative; boundary="Apple-Mail=_2B517248-8C66-465B-8FC3-DD300472E92B" 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 10:59:32 +0800 References: To: user@zookeeper.apache.org, andor@cloudera.com In-Reply-To: Message-Id: <7625B64C-CA1E-463B-83BF-DABBC83144FF@gmail.com> X-Mailer: Apple Mail (2.3445.4.7) archived-at: Tue, 14 Nov 2017 02:59:51 -0000 --Apple-Mail=_2B517248-8C66-465B-8FC3-DD300472E92B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Andor, let me clarify the problem since zookeeper promise that these operation are sending in pipeline, so = the later operation don't need to wait the prior's confirmation. so the = three operations 1. set a =3D 1 2. set b =3D 1 3. set ready =3D true these three operations are sending in pipeline, the first operation set = a =3D 1 is process ok, and the second operation set b =3D 1 is on the = way. then there is something wrong with the leader, then the client = connect a new tcp connection with the leader. And then the client send = the last operation, since there is two tcp connection from client to = server, even through the first is closed from the client's view, but = there maybe still some redidual data, so we can't promise whether the = second operation will arrive to the leader, and we also can't promise = that the second operation arrive to the leader before the third one or = after the third one. so this violate the client FIFO order. my question here is that, is it zookeeper promise only channel FIFO = order, not the client FIFO order. so if the client reconnect a new tcp = connection, we can't promise the FIFO order. Another question is that if zookeeper only promise channel FIFO order, I = think raft which is build upon tcp also promise FIFO client order, since = ther FIFO order is promise by the tcp connection, and almost any = consensus algorithm combine with tcp will promise FIFO client order. Thank you=20 ---------------------------------------- =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 13 Nov 2017, at 22:17, Andor Molnar wrote: >=20 > 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 --Apple-Mail=_2B517248-8C66-465B-8FC3-DD300472E92B--