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 95C55176BE for ; Mon, 10 Nov 2014 10:46:39 +0000 (UTC) Received: (qmail 29848 invoked by uid 500); 10 Nov 2014 10:46:39 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 29806 invoked by uid 500); 10 Nov 2014 10:46:39 -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 29794 invoked by uid 99); 10 Nov 2014 10:46:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Nov 2014 10:46:38 +0000 X-ASF-Spam-Status: No, hits=3.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of liaoyisheng89@gmail.com designates 209.85.220.179 as permitted sender) Received: from [209.85.220.179] (HELO mail-vc0-f179.google.com) (209.85.220.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Nov 2014 10:46:11 +0000 Received: by mail-vc0-f179.google.com with SMTP id ij19so3757692vcb.38 for ; Mon, 10 Nov 2014 02:45:25 -0800 (PST) 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=343YilCYwN69nNEdyFwuTl4hEq6wQ1/uFKVThoPBCTc=; b=uFxNESxO7HKLFPbe+c9+ZkdX92q8o6Uu8vr88rIoa+PoWcycSBtmbo07s2ygMsVeSW jXPiy0SQyrOv3yWPx8wfRPGgeheGjzKEl9/4+r6uzKDyFCuNzTAde/P3MuCgfHaBeQh4 JZfHHsP0CoWNQJ53zIQ8KOT2aXs9D6KWi1dDjhoMPSkV0I220PEAZOK5GVxfF1Wo+mGE FePc+2gz/YVtGkU5N9mFg9RcuyYjVCcjGv9Fw3KN0RphJxJ0h5JYhjo1QoceHV/Fzefv 05DNsLNhbXl/0nSZjvGqHUTSsyC6uiHdUZ4u2fq9gDONc80/3Z1yEbBbDBZ1KmGe+/0F Ec1w== MIME-Version: 1.0 X-Received: by 10.220.173.69 with SMTP id o5mr948410vcz.35.1415616325690; Mon, 10 Nov 2014 02:45:25 -0800 (PST) Received: by 10.220.229.201 with HTTP; Mon, 10 Nov 2014 02:45:25 -0800 (PST) In-Reply-To: References: <201411101836054523297@163.com> Date: Mon, 10 Nov 2014 02:45:25 -0800 Message-ID: Subject: Re: How does Zookeeper handle this situation From: Eason Liao To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=089e0149c4a63b2d3605077edc52 X-Virus-Checked: Checked by ClamAV on apache.org --089e0149c4a63b2d3605077edc52 Content-Type: text/plain; charset=UTF-8 Here data means the transactions in log, not the data in ZooKeeper's in-memory tree structure. The transaction must be committed first before gets applied to ZooKeeper's in-memory state. 2014-11-10 2:41 GMT-08:00 Eason Liao : > It's possible that D, E have more recent data, and the data of D, E will > be discarded if they join leader. This is fine as long as the data is not > COMMITTED. > > We consider the transaction is committed only if the transaction is > persisted in the log of majority servers. In this case, if D, E have the > committed data, then at least > one of A, B, C will also have it. So the committed data won't get lost. > > Hope this answers your question. > > > > 2014-11-10 2:36 GMT-08:00 bit1129@163.com : > > >> Hi zookeepers, >> >> I got a question about leader election during ensemble starts up. Say, >> I got five servers, ABCDE, and start them one by one. >> According to the election algorithm, ABC forms the majority, and then a >> leader is elected among ABC. When D, E start up, they will follow the >> leader. What if D or E have more recent data among ABCDE? >> D,E's latest data will simply be discard? If this is case, this is a >> critical issue. >> >> Very likely that I missed something how leader election works during >> startup, any explanation on this? thinks. >> >> >> >> >> bit1129@163.com >> > > --089e0149c4a63b2d3605077edc52--