Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 75209 invoked from network); 17 Mar 2008 14:40:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2008 14:40:08 -0000 Received: (qmail 9461 invoked by uid 500); 17 Mar 2008 14:40:05 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 9432 invoked by uid 500); 17 Mar 2008 14:40:05 -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 9423 invoked by uid 99); 17 Mar 2008 14:40:05 -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:40:05 -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: domain of damienkatz@gmail.com designates 216.239.58.190 as permitted sender) Received: from [216.239.58.190] (HELO gv-out-0910.google.com) (216.239.58.190) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 14:39:25 +0000 Received: by gv-out-0910.google.com with SMTP id y18so1188533gvf.17 for ; Mon, 17 Mar 2008 07:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=ILRwarLxfxi2m2Uh6kRqVRj1XJlrF+pOJIU9Gjc9HmM=; b=v5mujantr5pNWaTW3VmF2bhj5fsy4cqytV6DwscxacGr5zLnazbnHmj9L/Ql0xsP7urL9/jlpIQZNQBuEunLdaGXDv18+VROb7uH9Ja0DxyGmeLtBBo99tf4fQfyNNQQsd4HeNdZK05OM0/9Rpnhv59f5wZpJtR9OseaRtDFEyI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=cKyQT9Ia0i5iZebufzioST0GeAOTcsAJgdVi+F4OFl43TzacP6RYuzVrhSNfaBnvZK/QKIuU3SV1V9201/+WPIX5WGtPga0Pd2ts4EEWlJ01NWyvcVxjJ/g52hoH6hmx+p4w5S1o9zCSaQBT0JWCOX7v3bddnWSXjh4XDj+cBiE= Received: by 10.142.201.3 with SMTP id y3mr174059wff.1.1205764772108; Mon, 17 Mar 2008 07:39:32 -0700 (PDT) Received: from ?10.0.1.188? ( [71.68.49.63]) by mx.google.com with ESMTPS id i36sm54385wxd.20.2008.03.17.07.39.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Mar 2008 07:39:24 -0700 (PDT) Message-Id: <9211BC7B-58C5-4FAA-A09E-765BE1BD8C79@gmail.com> From: Damien Katz To: couchdb-user@incubator.apache.org In-Reply-To: <47DE7FA8.6000003@theopenlearningcentre.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Relying on revisions for rollbacks Date: Mon, 17 Mar 2008 10:38:49 -0400 References: <1205753351.7678.18.camel@localhost> <828B1624-4992-4BE5-ADED-EB252DC88BD8@apache.org> <47DE7FA8.6000003@theopenlearningcentre.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On Mar 17, 2008, at 10:26 AM, Alan Bell wrote: > 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. Possibly. Right now I want to keep things as simple in concept and implementation as possible. Keeping previous revisions as attachments will keep the api and database model as simple, perhaps while pushing some of the complexity of managing previous revisions back out to the clients. That's ok for now, but if it proves to be unwieldy we can add more enhancements later to make things easier. > > > 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 > >