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 87AC29842 for ; Fri, 15 Jun 2012 19:46:09 +0000 (UTC) Received: (qmail 15950 invoked by uid 500); 15 Jun 2012 19:46:09 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 15865 invoked by uid 500); 15 Jun 2012 19:46: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 15857 invoked by uid 99); 15 Jun 2012 19:46:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 19:46:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of raj.cassandra@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 19:46:02 +0000 Received: by obbuo13 with SMTP id uo13so4131449obb.15 for ; Fri, 15 Jun 2012 12:45:42 -0700 (PDT) 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=I550lyaWNMZxrWbFm62L0+CKB0A7jw76HVLu6UHl/Kw=; b=bl4FNz/rfhBRDmMAmmD3b6ZIfdO1IryF4g9eOCDeiHEzYgdM0CN8CBL5Puh068wAms 9bDMXrC1oxaijOvzCMls0Jt4T4pN8Y6FJLsaRBASLoTn5AFKFQpRaSPJEsW7F2UhcR0k bXnAewuZf35xi2dtp4sw6h1FFXMfcGvxckCaKZ6Luyut+B8HGt6QsFlT8vxpGG96/xc/ xpRaEJHvj5r9Uk+GVo0s3iuyzitLH1BUTEAnX7C5QJFEV1FiACzIrA9yD+IFuPvnLr+W U0hpLlFj8Gsksay22mLzk7SZ/IBwkjagobgHTRQN5yRpMm3RLn3M8xs17Ilh/POj0JwH Gmiw== MIME-Version: 1.0 Received: by 10.182.14.100 with SMTP id o4mr7258653obc.23.1339789541823; Fri, 15 Jun 2012 12:45:41 -0700 (PDT) Received: by 10.76.70.131 with HTTP; Fri, 15 Jun 2012 12:45:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Jun 2012 15:45:41 -0400 Message-ID: Subject: Re: forceSync=no From: Raj N To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=14dae9399bb5b6d3a004c2880f71 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9399bb5b6d3a004c2880f71 Content-Type: text/plain; charset=ISO-8859-1 Thanks Patrick. So back to my original question. Will forceSync=no cause a zookeeper node to not start up cleanly if it crashed? It doesn't happen all the time. But it happened to me once. I had to cleanup all the transaction logs on all the nodes and then bring the nodes back up. For my use case I can tolerate losing data in the worst case scenario since I can regenerate all the data. But I should be able to tolerate a single point of failure as long as the node comes back up cleanly. Can zookeeper recover from a corrupt transaction log using existing snapshots and then replaying messages from its peers? Thanks -Raj On Fri, Jun 15, 2012 at 2:17 PM, Patrick Hunt wrote: > For a single node failure I believe so. > > Patrick > > On Thu, Jun 14, 2012 at 11:56 AM, Raj N wrote: > > Sorry, I should have been more specific. By corrupt, I mean that the > > zookeeper node doesn't come back up on a restart. I would have imagined > > that zookeeper would sync the lost transactions from its peers. I agree I > > will have a problem if I have multiple failures. But for a single node > > failure in a 3-node ensemble, I should be able to recover even if > > forceSync=no. > > > > Thanks > > -Raj > > > > On Thu, Jun 14, 2012 at 1:03 PM, Jonathan Simms > wrote: > > > >> There's a big warning in the documentation that says that's a > possibility. > >> If you don't force both Java and the OS to flush their IO buffers to > disk, > >> then you have no guarantees that your data is consistent. > >> > >> On 6/14/12 10:56 AM, "Raj N" wrote: > >> > >> >Are you guys aware of any issues with forceSync=no that could cause the > >> >transaction log to get corrupted on a zookeeper crash. > >> > > >> >Thanks > >> >-Raj > >> > >> > >> > --14dae9399bb5b6d3a004c2880f71--