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 81ACC200D4A for ; Tue, 14 Nov 2017 06:08:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8010A160C07; Tue, 14 Nov 2017 05:08:08 +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 C4CBA160BF3 for ; Tue, 14 Nov 2017 06:08:07 +0100 (CET) Received: (qmail 86143 invoked by uid 500); 14 Nov 2017 05:08:06 -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 86076 invoked by uid 99); 14 Nov 2017 05:08:06 -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 05:08:06 +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 5201418AD70 for ; Tue, 14 Nov 2017 05:08:05 +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=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 lZk-Pyz2V-cC for ; Tue, 14 Nov 2017 05:08:02 +0000 (UTC) Received: from mail-ot0-f182.google.com (mail-ot0-f182.google.com [74.125.82.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 08B0B5F5A5 for ; Tue, 14 Nov 2017 05:08:02 +0000 (UTC) Received: by mail-ot0-f182.google.com with SMTP id v15so6484467ote.6 for ; Mon, 13 Nov 2017 21:08:01 -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 :cc; bh=8j7nxu18+i7ozH2K67o+84VOA9/I9rKJGIub1pFLQcM=; b=l1iJ7s/0CUkLz8kJ06ZXgHsfprYDB1rJ0cNb5p7FdWampUiMOxzglJm0iJlnz8e+fc UUuA/FyWWuP5H9wB0tamblp9Lf3uH8Hw9QzM2KqPH5h5XS0kZDgQGe1UvQ9iXtTpn3oL hh7pwnArX6Z6z18pG5RDJSsxjSSO1Pi6+2UNtm62gX95bXi9vVUhheoxbT7o9xHKLgM+ VKknCUB2FzWu4CAqqIPjKJHrgM0f/HMUyUuP9KNaSBon0l5HJIbzoyMA5IzLy6BoWVsF 2hJUvpyeFOuo7NFCxBkd2bbAke7BR+gg4olsrQFTp6Pyb/Vy+J0Eidu6qyZpu5cJtHca W52A== 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:cc; bh=8j7nxu18+i7ozH2K67o+84VOA9/I9rKJGIub1pFLQcM=; b=YpB5p8EHOq0uW4FQ5TABGpAoZ5GYh04Pq9Z5lHpwoxFnULA7bLd3ExB3/7Lo4+XCe7 P0aQ24B0QboJ/fZD0F0IRaHXcqTa4JhdE5NJPyUY/ih6DwPYEPmlZ6mVb+6Doe+2r8Bv izqalTfIdSmnUbsyJWXRrslQGSxhT7f+uVHyqjkRGvVWa2WcuPkC8spMxTp7catjUWji LEF/uXBw9uTTL3FRk0UXRNRnjCfNrbRlam20v8+6eUq+MjScAYIl5iPrMwHXZScNeJ7D tKwjQDYR/hfe7iG92yaxabggmQRNzjadHFIZ0nBNWwORg0ZHbk+Cuz8wVIeEwa9/6gjA leNg== X-Gm-Message-State: AJaThX5DzyZzALpAeVDjuSDwlzwQrALcyAErEgmM7ckySb60gvrs2nhj HDopj2yyd3kNgAFA35msuS8kLFwa826gQEDhSZR4hA== X-Google-Smtp-Source: AGs4zMakMlH6qit+bLcf9DY9t9I89pO8KmGWgHO5D9G/a+VIkQxK3v1ERfrpVKgbTd+RX4ifpk1D25Q+wjGQxqgvUN4= X-Received: by 10.157.64.199 with SMTP id t7mr6530356oti.328.1510636080574; Mon, 13 Nov 2017 21:08:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.40.144 with HTTP; Mon, 13 Nov 2017 21:08:00 -0800 (PST) In-Reply-To: References: <1510618325.2966293.1171459416.240F2D1D@webmail.messagingengine.com> From: Andor Molnar Date: Tue, 14 Nov 2017 06:08:00 +0100 Message-ID: Subject: Re: how zookeeper promise FIFO client order To: user@zookeeper.apache.org Cc: dev@zookeeper.apache.org, afine@apache.org Content-Type: multipart/alternative; boundary="94eb2c1c1008f7d520055dea5eb8" archived-at: Tue, 14 Nov 2017 05:08:08 -0000 --94eb2c1c1008f7d520055dea5eb8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Oh, I see your problem now. Abe is right, you can find find the best answer in the book and the short answer is, yes, it only promises channel fifo order. Regards, Andor On Tue, Nov 14, 2017 at 4:04 AM, baotiao wrote: > Hello Abraham > > right, exactly. > > my confusion is that the client FIFO order is for a client or only for a > tcp connection > ---------------------------------------- > > Github: https://github.com/baotiao > Blog: http://baotiao.github.io/ > Stackoverflow: http://stackoverflow.com/users/634415/baotiao > Linkedin: http://www.linkedin.com/profile/view?id=3D145231990 > > > On 14 Nov 2017, at 08:12, Abraham Fine wrote: > > > > Hello- > > > > My understanding is that the question is about the possibility of a rac= e > > 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. > > > > Thanks, > > Abe > > > > On Mon, Nov 13, 2017, at 06:17, Andor Molnar wrote: > >> Hi baotiao, > >> > >> First, requests are acknowledged back to the client once the leader > >> accepted and written them in its transaction log, which guarantees tha= t > >> 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 > >> on > >> the way"? > >> > >> If "set b=3D1" is accepted by the leader, the client won't have to res= end > >> it > >> 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 clie= nt > >>> 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 t= he > >>> 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 sen= t > 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. > >>> > >>> 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 > >>> > > --94eb2c1c1008f7d520055dea5eb8--