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 55F991027C for ; Sun, 30 Nov 2014 21:31:10 +0000 (UTC) Received: (qmail 44948 invoked by uid 500); 30 Nov 2014 21:31:09 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 44906 invoked by uid 500); 30 Nov 2014 21:31:09 -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 44895 invoked by uid 99); 30 Nov 2014 21:31:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 21:31:09 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of taylor.osmun@ca.ibm.com designates 32.97.182.138 as permitted sender) Received: from [32.97.182.138] (HELO e8.ny.us.ibm.com) (32.97.182.138) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 21:31:01 +0000 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 30 Nov 2014 16:30:09 -0500 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e8.ny.us.ibm.com (192.168.1.108) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 30 Nov 2014 16:30:08 -0500 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 25E99C9003E for ; Sun, 30 Nov 2014 16:22:06 -0500 (EST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAULU20v25231546 for ; Sun, 30 Nov 2014 21:30:02 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAULU2JU017025 for ; Sun, 30 Nov 2014 16:30:02 -0500 Received: from d25ml03.torolab.ibm.com (d25ml03.torolab.ibm.com [9.26.29.96]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAULTxsM016687 for ; Sun, 30 Nov 2014 16:29:59 -0500 Subject: 3.5.0-alpha-1615249: Issue with Zxid during Observer failover to Read-Only X-KeepSent: 9CBED23B:79935A3D-85257DA0:007608AB; type=4; name=$KeepSent To: user@zookeeper.apache.org X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 Message-ID: From: Taylor Osmun Date: Sun, 30 Nov 2014 16:29:59 -0500 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 9.0.1FP1HF281 | June 16, 2014) at 11/30/2014 16:29:58 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=0ABBF733DFE58E3B8f9e8a93df938690918c0ABBF733DFE58E3B" Content-Disposition: inline X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14113021-0029-0000-0000-0000014332B1 X-Virus-Checked: Checked by ClamAV on apache.org --0__=0ABBF733DFE58E3B8f9e8a93df938690918c0ABBF733DFE58E3B Content-type: text/plain; charset=US-ASCII I currently have the following configuration: * 1 server running locally * 1 observer running locally (which accepts read-only mode) 1) I begin by starting up the server, and then the observer, both operate normally and Zxid is in sync: echo stat | nc localhost 2181 Zookeeper version: 3.5.0-alpha-1615249, built on 08/01/2014 22:13 GMT Clients: /127.0.0.1:45432[0](queued=0,recved=1,sent=0) Latency min/avg/max: 0/0/0 Received: 2 Sent: 1 Connections: 1 Outstanding: 0 Zxid: 0x100000003 Mode: leader Node count: 6 echo stat | nc localhost 2182 Zookeeper version: 3.5.0-alpha-1615249, built on 08/01/2014 22:13 GMT Clients: /127.0.0.1:36159[0](queued=0,recved=1,sent=0) Latency min/avg/max: 9/44/112 Received: 6 Sent: 5 Connections: 1 Outstanding: 0 Zxid: 0x100000003 Mode: observer Node count: 6 2) However, when I shutdown the server, the observer properly enters read only mode, but resets its Zxid to 0. It does not reload the database: echo stat | nc localhost 2182 Zookeeper version: 3.5.0-alpha-1615249, built on 08/01/2014 22:13 GMT READ-ONLY mode; serving only read-only clients Clients: /127.0.0.1:36179[0](queued=0,recved=1,sent=0) Latency min/avg/max: 0/0/0 Received: 3 Sent: 2 Connections: 1 Outstanding: 0 Zxid: 0x0 Mode: read-only Node count: 5 As a result, my read-only observer instance is essentially empty. The only way to fix this is to restart the observer, which properly reads the local database. The issue I can see here (according to source) is that the ZKDatabase is not reloaded when the ReadOnlyZooKeeperServer is initialized (after ZKDatabase has been cleared). Thoughts? Is this known? Note that restarting the read-only observer results in the proper Zxid being used, as it loads the database properly. Cheers, Taylor --0__=0ABBF733DFE58E3B8f9e8a93df938690918c0ABBF733DFE58E3B--