couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Pinning revs
Date Wed, 27 Jan 2010 04:16:20 GMT
On Mon, Jan 25, 2010 at 7:24 AM, Joscha Feth <> wrote:
> Robert Newson wrote:
>> It's not clear if any of that belongs inside couchdb but clearly
>> something like it would be useful to a lot of folks. Perhaps it's
>> another tool outside of couchdb that, like couchapp, adds some finesse
>> over a fundamental concept?
> But isn't there the chance that any external program might miss some
> revisions if old revisions are discarded prior to being picked up by
> any external process fetching them?

It's complications like this that point to a document (or attachment)
per revision model for wiki-like storage.

The more I think about it the more I realize Damien is right that for
versioned storage you should attach the old version as a text/json

This way you don't have to deal with the mass of old revisions. Also,
each attachment update is atomic with the new data. The best way to
compress something like this would be to run it on a
content-addressable filesystem.


> Let's say we have a scenario like this with a program fetching
> revisions based on a cronjob which runs in a predefined interval:
> A has rev-1
> fetching revisions
> Update on A. Revison gets bumped to rev-2
> Compaction run on database
> Update on A. Revison gets bumped to rev-3
> fetching revisions <-- no way to fetch rev-2 as it got deleted already.
> so for using an external program to do the revision work, there is no
> way to just do this at a predefined interval, except if compactions can
> be suppressed until it runs again and as far as I understand the
> current design might not guarantee this?!
> So the only other option would be a program which listens on _changes
> and uses the ?since parameter - what happens to the scenario above
> then? Are events on _changes preserved even over compaction?
> regards,
> Joscha
> --

Chris Anderson

View raw message