Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 7260 invoked from network); 9 Aug 2010 18:53:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Aug 2010 18:53:36 -0000 Received: (qmail 11768 invoked by uid 500); 9 Aug 2010 18:53:36 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11677 invoked by uid 500); 9 Aug 2010 18:53:35 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11669 invoked by uid 99); 9 Aug 2010 18:53:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Aug 2010 18:53:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fdmanana@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Aug 2010 18:53:29 +0000 Received: by yxm8 with SMTP id 8so5241244yxm.11 for ; Mon, 09 Aug 2010 11:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=BLYBSgnT9k2dbqsXYzsw0ULUpvx0zp5PPFjDlbJe+iI=; b=gEg/21kjNom+l305SuEDhnwi7k/jwvWP5r3SgTPUTsjTEBEs7NRzrcF3kRa5DoV20C 6w4DDa2NDzRBrza1bwz5Q2C9lMQdjmCBp2RbD8/pDOTsHt+irbUQa6SGj50UVWO4cZBN f7FG8dr4BSrfDrQ+9iomo5mMQhF/bSfmLKo1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=dTgOyIJI6HrnCWYUcwm2WC8iL2XWoazaTrhbWhtc4EDCLCMRmBF4tUgY1oR5ZJe3LP Oqrb04hDUpomofKaJVrrf32BoqBMGI8WLn1MgPlQS7/Cj4gObD0Cwk5mro6u4L2uu4rh WwRPKxKPADwVd1v7WDxpW1LlQT8oJ/Q6nay9c= MIME-Version: 1.0 Received: by 10.150.168.2 with SMTP id q2mr18005965ybe.341.1281379988077; Mon, 09 Aug 2010 11:53:08 -0700 (PDT) Sender: fdmanana@gmail.com Received: by 10.231.185.15 with HTTP; Mon, 9 Aug 2010 11:53:07 -0700 (PDT) In-Reply-To: References: <8385F758-360B-425A-ACBD-03C898BFDA21@apache.org> Date: Mon, 9 Aug 2010 19:53:07 +0100 X-Google-Sender-Auth: UFPn1vIrVz0rHEWjpD47dCSLmkI Message-ID: Subject: Re: data recovery tool progress From: Filipe David Manana To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd676a802fd4d048d68877f X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd676a802fd4d048d68877f Content-Type: text/plain; charset=UTF-8 For the record (and people not on IRC), the code at: http://github.com/fdmanana/couchdb/commits/db_repair is working for at least simple cases. Use couch_db_repair:repair(DbNameAsString). There's one TODO: update the reduce values for the by_seq and by_id BTrees. If anyone wants to give some help on this, your welcome. On Mon, Aug 9, 2010 at 6:12 PM, Mikeal Rogers wrote: > I'm starting to create a bunch of test db files that expose this bug under > different conditions like multiple restarts, across compaction, variances > in > updates the might cause conflict, etc. > > http://github.com/mikeal/couchtest > > The README outlines what was done to the db's and what needs to be > recovered. > > -Mikeal > > On Mon, Aug 9, 2010 at 9:33 AM, Filipe David Manana >wrote: > > > On Mon, Aug 9, 2010 at 5:22 PM, Robert Newson > >wrote: > > > > > Doesn't this bit; > > > > > > - Db#db{waiting_delayed_commit=nil}; > > > + Db; > > > + % Db#db{waiting_delayed_commit=nil}; > > > > > > revert the bug fix? > > > > > > > That's intentional, for my local testing. > > That patch isn't obviously anything close to final, it's too experimental > > yet. > > > > > > > > B. > > > > > > On Mon, Aug 9, 2010 at 5:09 PM, Jan Lehnardt wrote: > > > > Hi All, > > > > > > > > Filipe jumped in to start working on the recovery tool, but he isn't > > done > > > yet. > > > > > > > > Here's the current patch: > > > > > > > > http://www.friendpaste.com/4uMngrym4r7Zz4R0ThSHbz > > > > > > > > it is not done and very early, but any help on this is greatly > > > appreciated. > > > > > > > > The current state is (in Filipe's words): > > > > - i can detect that a file needs repair > > > > - and get the last btree roots from it > > > > - "only" missing: get last db seq num > > > > - write new header > > > > - and deal with the local docs btree (if exists) > > > > > > > > Thanks! > > > > Jan > > > > -- > > > > > > > > > > > > > > > > > > > -- > > Filipe David Manana, > > fdmanana@apache.org > > > > "Reasonable men adapt themselves to the world. > > Unreasonable men adapt the world to themselves. > > That's why all progress depends on unreasonable men." > > > -- Filipe David Manana, fdmanana@apache.org "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men." --000e0cd676a802fd4d048d68877f--