incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ciprian Dorin Craciun <ciprian.crac...@gmail.com>
Subject Re: Simple "transactional" access (i.e. "repeatable reads") (related to `last_seq` for previous revisions)
Date Wed, 19 Dec 2012 12:11:31 GMT
On Wed, Dec 19, 2012 at 12:04 PM, Dave Cottlehuber <dch@jsonified.com> wrote:
> 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.

    Ok... Either I'm not able to express myself well enough in English, or...

    This is the n-th time I reiterate the fact that:
    * I don't want to obtain a versioning system out of CouchDB;
    * I know that revisions aren't replicated, persistent, etc.;
    * I only want to "opportunistically" be able to obtain a snapshot
in time of the some related documents stored inside the same CouchDB
database;
    * if it happens that the revision that matches that "snapshot"
isn't available I will restart the entire operation, until either the
process tries enough times, or it manages to push through the
changes...


> Would you live in your car, using the back seat as a bed?

    Thus no... I don't want to live in my car... But it happens that
sometimes you do need to sleep on the back seat... :)


> 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.

    No it's not the same result. I don't want the revisions to be
persistent. I only want to be able to find out the "sequence" of a
particular revision. (In the end I think I'll settle with a timestamp
written by the application layer, or some other global counter.)


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

    Again, as said I know that MVCC is not reliable. I can live
without reliability... But it would be nice to have access to the
MVCC...


    Thanks for the reply, don't get me wrong, I understand that what I
want to do is "unorthodox", and I understand all its negative
implications. But for this limited use case that I have I think it's
the best solution.
    Ciprian.

Mime
View raw message