Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 9613 invoked from network); 28 Mar 2009 01:49:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2009 01:49:57 -0000 Received: (qmail 23437 invoked by uid 500); 28 Mar 2009 01:49:57 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 23360 invoked by uid 500); 28 Mar 2009 01:49:57 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 23350 invoked by uid 99); 28 Mar 2009 01:49:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Mar 2009 01:49:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.207.101] (HELO web32004.mail.mud.yahoo.com) (68.142.207.101) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 28 Mar 2009 01:49:49 +0000 Received: (qmail 10768 invoked by uid 60001); 28 Mar 2009 01:49:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1238204968; bh=lLcZUTLuMtBb4+1QtqT8JbsT3BKempfI0wNRCmXV8MM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=onDmw8eK1y0XcmR51HzELGVOWYLkXpVNFWYuIg8SzQ0/Orx3YyrEzdGO5bMZNTB/ZF/qlQ20fEb7eoKr6u1xCDPDFpspJ42XYQ+no4kZ211Hq15YbQdEmExZu3e3v9rc6dmtTs1EFeE7rTH1FsiuGDjxjt1SOnbGOLLCvciZ7nQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Sb6MRllE3BHotCAm89b02RLQtUIjCnEC7+Q1dArPpnFCgRkCuVcoC+QCCsIIfnnVSr80YRuGcvBJ30PsoSn/smRGFS8OKOZezqlogG2hVftCxPot/eH9HQuCRAVdKsVDDA6ZHvLgzof8EErSuEGmZXrQ5VPitdRw4hxHB/Cxyqw=; Message-ID: <24288.10584.qm@web32004.mail.mud.yahoo.com> X-YMail-OSG: wHHMqfEVM1lZ3Bw5uy9xeGMYpeE5JuwbTXK6fRNavKTo4bS.2VVPvYnYsMvNpWB16bRVaGjC2vVxEdluDNj0AuRwFRP3ze458_oOpqyUwx4sSR8R.hePLy_NdbbKMdRoxVC7.fYyqxkgsSWlXw1KgSo8vkIDZsSUwTAC9piyvEgh6weE9zoahPgu5ZUw Received: from [65.113.40.1] by web32004.mail.mud.yahoo.com via HTTP; Fri, 27 Mar 2009 18:49:27 PDT X-Mailer: YahooMailRC/1277.32 YahooMailWebService/0.7.289.1 Date: Fri, 27 Mar 2009 18:49:27 -0700 (PDT) From: "raghul@yahoo.com" Subject: Divergence in ZK transaction logs in some corner cases? To: zookeeper-user@hadoop.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org ZK gurus,=0A=0AI think the ZK transaction logs can diverge from one another= in some corner cases. I have one such corner case listed below, could you = please confirm if my understanding is correct?=0A=0AImagine a 5 srever ense= mble (A,B,C,D,E). All the servers are @ zxid 9. A is the leader and it star= ts a new PROPOSAL (@zxid 10). A writes the proposal to the log, so A moves = to zxid 10. Others haven't received the PROPOSAL yet and A crashes. Now the= following happens:=0A=0A1. B is elected as the newleader. B bumps up its i= n-mem zxid to 10. Since other nodes are at the same zxid, it sends a SNAP s= o that the others can rebuild their data tree. In-memory zxid of all other = nodes moves to 10. =0A=0A2. A comes back now, it accepts B as the leader = as soon as the leader (B) and N/2 other nodes vouch for B as the leader. So= A joins the ensemble. Every zookeeper node is at zxid 10.=0A=0A3. A new re= quest is submitted to B. B runs PROPOSAL and COMMIT phases and the cluster = moves up to zxid 11. But the transaction log of A is different from that of= everyone else now. So the transaction logs have diverged.=0A=0ACould you c= onfirm if this can happen? Or am I reading the code wrong?=0A=0AThanks=0ARa= ghu=0A=0A=0A