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 5F000200D3D for ; Mon, 13 Nov 2017 15:17:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5D622160BF3; Mon, 13 Nov 2017 14:17:42 +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 A3014160BE4 for ; Mon, 13 Nov 2017 15:17:41 +0100 (CET) Received: (qmail 16192 invoked by uid 500); 13 Nov 2017 14:17:40 -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 16180 invoked by uid 99); 13 Nov 2017 14:17:40 -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; Mon, 13 Nov 2017 14:17:40 +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 677A6180840 for ; Mon, 13 Nov 2017 14:17:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.629 X-Spam-Level: ** X-Spam-Status: No, score=2.629 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] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera.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 xc8s3risP0k0 for ; Mon, 13 Nov 2017 14:17:37 +0000 (UTC) Received: from mail-ot0-f178.google.com (mail-ot0-f178.google.com [74.125.82.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 1A3665FBB0 for ; Mon, 13 Nov 2017 14:17:37 +0000 (UTC) Received: by mail-ot0-f178.google.com with SMTP id o9so13735514ota.3 for ; Mon, 13 Nov 2017 06:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=AAQMIJoFePKwd4ChyA13hBiyCS5Fh5jy/hYyrSqIwwc=; b=Lx3M8OSpCRb28K5buKXQiGujxMG1l3EPLYXsvbmKFBQLigHz1rTHsbdFAqdjB2rHF7 sCwr1FHuhNq7e5sENSVYszQ3kl6YDliBqy7vSSHLu6T2S4GLAWZmuv6IZu/WOL+WZxUW 79SS+d/ljf4x6pn5/O/pUHJyjTP5vqA4JGo6axcEXpmWBOkU7/27kWXVPSDO6j1WdMI4 OwiY4BzpGOctV6GZYHsHMTGF/abZzXA73ASZj5XoXHNfA3kPOpB+IKtES7isNdBjbTJu 4eBTyxOINWwXiuEpJQGEZmg2XjSb3UcuZxQFzI+zvDLMKN9QNP4mrvzWOxQpay4Ahwtw /FXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=AAQMIJoFePKwd4ChyA13hBiyCS5Fh5jy/hYyrSqIwwc=; b=NfPlYypmKO4WRwwyFsWZrpdhz2SojaXwkdWXRv6GgESywzljxcIK4a1msM4vMcwOHU d4ysvnwcosEqXByhL4Xwvz2efuTU/OKRSCD3Hp4QgekSo0Cij+SN8hGsmSauM2nlWxhg BTcGc5uRnc9UjAAFeHpDwh8RY3R+CVIgh53cCB7j/dwq8yyveTFOaP5CMz8RpbEC7VcK itWYRejtzYJIevgrmf+P2oN1seVn+2WtdYa5f8jWsf+V0/X1JlUbivNrxKUQr+E8mPQa Bf30fIbdjJlBK/hmOqoR2wBskoUMLfJxfoFNnQfuKwWjKnN9E4abXjBQsjWMg65la091 Cnbg== X-Gm-Message-State: AJaThX6Se1Jvdaa8WMilceYV37Cajj632VFnCHUsR3uOh21KTecJanyL c1joP3BufP8hygDFAw+YB4biVjviw9n0SHc5DmyHRg== X-Google-Smtp-Source: AGs4zMZY+FP9DEuKfhZLFAhTM0+PTnRXwKYk2F2iViATgsTpPxzl7J7NDM7JgIKsUwpMWbg8uxVwZXH+CZZGF8hAkPk= X-Received: by 10.157.25.2 with SMTP id j2mr5564525ota.16.1510582655679; Mon, 13 Nov 2017 06:17:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.40.144 with HTTP; Mon, 13 Nov 2017 06:17:35 -0800 (PST) In-Reply-To: References: From: Andor Molnar Date: Mon, 13 Nov 2017 15:17:35 +0100 Message-ID: Subject: Re: how zookeeper promise FIFO client order To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary="f4030435b33498a61a055dddee2c" archived-at: Mon, 13 Nov 2017 14:17:42 -0000 --f4030435b33498a61a055dddee2c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi baotiao, 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'. With these 2 promises, I believe, that FIFO is guaranteed by Zookeeper. Would you please clarify that what do you mean by "set b=3D1 operation is o= n the way"? If "set b=3D1" is accepted by the leader, the client won't have to resend i= t on reconnect. Regards, Andor On Mon, Nov 13, 2017 at 5:01 AM, =E9=99=88=E5=AE=97=E5=BF=97 wrote: > I want to know in the following situation, how zookeeper promise client > FIFO order. > > the client sent three operation to server, set a =3D 1, set b =3D 1, set = ready > =3D true. > > 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 clie= nt > reconnect a new tcp connection to the leader, but the set b =3D 1 operati= on > is on the way. then the client will use the new tcp connection to sent se= t > 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. > > the question is how zab promise client FIFO order? > > 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. > > is this the way the zab used to primise FIFO order? > > Thank you all > > -- > --- > Blog: http://www.chenzongzhi.info > Twitter: https://twitter.com/baotiao > Git: https://github.com/baotiao > --f4030435b33498a61a055dddee2c--