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



Reply via email to