incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <...@jsonified.com>
Subject Re: Simple "transactional" access (i.e. "repeatable reads") (related to `last_seq` for previous revisions)
Date Wed, 19 Dec 2012 10:04:29 GMT
On 19 December 2012 10:26, Ciprian Dorin Craciun
<ciprian.craciun@gmail.com> wrote:
> On Wed, Dec 19, 2012 at 11:18 AM, Robert Newson <rnewson@apache.org> wrote:
>> 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.
>
>     Indeed I understand that the internal MVCC features shouldn't be
> used on a day to day business. But in my case I intend to use CouchDB
> as a "backend" store, thus I'll have a stronger control over it than a
> normal application / user.
>
>     From your reply I also understand from this that it is available
> somehow... Thus how? :)
>
>     Ciprian.

Please don't abuse CouchDB's MVCC to act as a version control system.
Would you live in your car, using the back seat as a bed?

You can store every version that you wish to keep as a separate
attachment within the same document, or as a separate document and use
some sort of complex id to track it, or add an additional field for
the same result.

Those patterns are reliable and appropriate. Using MVCC is not.

Compaction is not only saving on disk space but aids performance by
bringing ordered data into contiguous blocks in the db file again,
e.g. for range queries this helps.

A+
Dave

Mime
View raw message