Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 329CC10AC3 for ; Thu, 6 Feb 2014 23:13:54 +0000 (UTC) Received: (qmail 42814 invoked by uid 500); 6 Feb 2014 23:13:52 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42766 invoked by uid 500); 6 Feb 2014 23:13:52 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 42758 invoked by uid 99); 6 Feb 2014 23:13:52 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 23:13:52 +0000 Received: from localhost (HELO [192.168.1.4]) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2014 23:13:51 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: CouchDB transactions? From: Robert Samuel Newson In-Reply-To: Date: Thu, 6 Feb 2014 23:13:48 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <52F40F9E.6040105@alwaysreformed.com> To: user X-Mailer: Apple Mail (2.1827) CouchDB transactions are at the individual document level, _bulk_docs = are *not* atomic at the group level with any settings. B. On 6 Feb 2014, at 23:01, Mark Hahn wrote: > That doesn't guarantee a real transaction though, does it? Two of = these > could overlap. >=20 > Also: "If the _rev does not match the current version of the document, = then > that particular document will *not* be saved ..." >=20 > Since you can't prevent collisions this would seem to be a = show-stopper. >=20 >=20 > On Thu, Feb 6, 2014 at 2:41 PM, Tim Black = wrote: >=20 >>=20 >> 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. >>>=20 >>> 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. >>>=20 >>> 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? >>=20 >>=20 >> = http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API#Modify_Multiple_Docu= ments_With_a_Single_Request >>=20 >> Tim >>=20 >>=20