couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Simple "transactional" access (i.e. "repeatable reads") (related to `last_seq` for previous revisions)
Date Wed, 19 Dec 2012 09:18:52 GMT
Attempting to use CouchDB's MVCC mechanism as a user-facing version
control system is very problematic, it's probably the #1 misconception
about CouchDB. I strongly advise against it.

CouchDB only cares about the leaf revision of each document (typically
one, but can be more if there are conflicts). Only leaf revisions are
preserved by the compactor and only leaf revisions are replicated.
Compaction is a necessary maintenance chore, artificially delaying it
to preserve older revisions can be painful (i.e, you might run out of
disk space for no good reason).

B.

On 19 December 2012 08:10, Ciprian Dorin Craciun
<ciprian.craciun@gmail.com> wrote:
> On Wed, Dec 19, 2012 at 9:42 AM, svilen <az@svilendobrev.com> wrote:
>> IMO couchdb doesnt keep *all* revisions.. i think i read it somewhere.
>> so rough guess, maybe a version control system suits u better?
>> there are a few with usable APIs..
>
>     Indeed CouchDB doesn't store all revisions, but:
>     * it does store the latest few (I think I remember somewhere a
> configuration option to keep at least the N last revisions, or?);
>     * also the compaction can be run only on demand (thus I'm in
> control of when old revisions are dropped);
>
>     Thus in my case I don't want an arbitrary old revision. I just
> want to be able to access the revision which was written before a
> certain sequence number, which I can guarantee (through my own
> application level code) that won't span more than a few minutes. (Thus
> missing revisions from the database is not an issue.)
>
>     Ciprian.

Mime
View raw message