couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Pinning revs
Date Sun, 24 Jan 2010 10:20:54 GMT
Have there been any more thoughts about being able to use _rev as a history
mechanism?

I think this just means that certain older _revs can survive compaction, and
ISTM that the simplest way to achieve this would be to have a bit which
marks a particular revision as "pinned" (cannot be discareded).  This would
be very flexible.  For example, you could prune this bit so that you keep
one revision per day for the last week, one revision per month before that,
and so on.  When making an update in a wiki, you could pin the previous
revision only if it's more than 1 hour old, allowing multiple updates within
this window to be coalesced.

I think this would be a very convenient mechanism, and much moreso than
building a document with all the previous versions of interest within the
document itself, or as attachments.

I've even considered introducing artificial conflicts into the database
purely as a way to retain previous revs, but that's pretty messy.

Regards,

Brian.

Mime
View raw message