Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 69014 invoked from network); 17 Mar 2008 14:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2008 14:27:39 -0000 Received: (qmail 84513 invoked by uid 500); 17 Mar 2008 14:27:36 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 84491 invoked by uid 500); 17 Mar 2008 14:27:36 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 84482 invoked by uid 99); 17 Mar 2008 14:27:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 07:27:36 -0700 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 [80.68.93.145] (HELO www.astoryforbedtime.com) (80.68.93.145) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 14:26:56 +0000 Received: from 98.65.adsl.brightview.com ([80.189.65.98] helo=[192.168.2.11]) by www.astoryforbedtime.com with esmtp (Exim 4.63) (envelope-from ) id 1JbGIq-00082D-Eu for couchdb-user@incubator.apache.org; Mon, 17 Mar 2008 14:27:04 +0000 Message-ID: <47DE7FA8.6000003@theopenlearningcentre.com> Date: Mon, 17 Mar 2008 14:26:48 +0000 From: Alan Bell User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: couchdb-user@incubator.apache.org Subject: Re: Relying on revisions for rollbacks References: <1205753351.7678.18.camel@localhost> <828B1624-4992-4BE5-ADED-EB252DC88BD8@apache.org> In-Reply-To: <828B1624-4992-4BE5-ADED-EB252DC88BD8@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Could the compaction mechanism be rules based? For example it could run a javascript function like a view function passing in the document object and revision id and the function would return true or false depending on whether it is OK to purge that version. I can imagine some use cases where revisions would never be archived, others where revisions might be kept for 6 months, others where the last 5 revisions are kept regardless of age. More complex options might be possible, such as retaining every third revision older than 6 months or in a wiki context purging edits marked as minor. Alan. Jan Lehnardt wrote: > Heya, > On Mar 17, 2008, at 7:29 , Shahar Evron wrote: >> [...] >> As far as I understood, CouchDB does not keep old revisions indefinitely >> - so if I update a document, it's previous revisions might be deleted >> after a while. >> >> Is this true? > > That is correct. Not at the moment though :) The next release of CouchDB > will include a mechanism called "compaction" that will run > periodically and > prune out old revisions. > > We suggest that you manage old revisions to a document that you want > to keep around in attachments to the latest revision. > > Cheers > Jan > -- -- Alan Bell The Open Learning Centre Web: www.theopenlearningcentre.com Mob: +44 (0)7736 778908 Tel: +44 (0)8444 849388 The Open Learning Centre is a trading name of Bell Lord Ltd, a company registered in England and Wales #05868943. VAT Registration #GB 901 4715 55