couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <m...@hahnca.com>
Subject Re: Fwd: CouchDB transactions?
Date Thu, 06 Feb 2014 23:01:49 GMT
That doesn't guarantee a real transaction though, does it?  Two of these
could overlap.

Also: "If the _rev does not match the current version of the document, then
that particular document will *not* be saved ..."

Since you can't prevent collisions this would seem to be a show-stopper.


On Thu, Feb 6, 2014 at 2:41 PM, Tim Black <tim@alwaysreformed.com> wrote:

>
> On 02/06/2014 04:07 PM, Jo-Erlend Schinstad wrote:
> > A while ago (a year or so) I tried to use CouchDB to model trees. This
> > worked fine, except inserting or moving nodes proved very difficult, if
> not
> > impossible. The reason was that when I wanted to a move or insert, that
> > meant updating prev_node on two different documents. If something
> happened
> > after the first document was updated and before the second was updated,
> it
> > would mean the tree would be completely broken.
> >
> > If I could get a guarantee that these two documents were updated
> > simultaneous or not at all, both in the local database and while
> > replicating, I believe all my problems would be fixed. And I would
> > absolutely love this, because I was able to do some pretty cool things in
> > my prototypes.
> >
> > So; is this possible now or will it be? Just to be clear; I'm not asking
> > for relationships between documents, but merely a guarantee that a group
> of
> > documents are updated simultaneously or not at all.
> I need to do the same thing.  Would bulk updates solve the problem for you?
>
>
> http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API#Modify_Multiple_Documents_With_a_Single_Request
>
> Tim
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message