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 0C2DC113DA for ; Wed, 16 Apr 2014 14:33:32 +0000 (UTC) Received: (qmail 36491 invoked by uid 500); 16 Apr 2014 14:33:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36449 invoked by uid 500); 16 Apr 2014 14:33:29 -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 36441 invoked by uid 99); 16 Apr 2014 14:33:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2014 14:33:29 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jens@couchbase.com designates 199.193.200.194 as permitted sender) Received: from [199.193.200.194] (HELO hub029-VA-3.exch029.serverdata.net) (199.193.200.194) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2014 14:33:24 +0000 Received: from [10.0.1.9] (173.228.7.198) by east.exch029.serverdata.net (10.216.105.37) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 16 Apr 2014 07:33:03 -0700 Content-Type: text/plain; charset="windows-1252" MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1877.7\)) Subject: Re: Modeling Relationships and providing Transactional Integrity From: Jens Alfke In-Reply-To: Date: Wed, 16 Apr 2014 07:32:58 -0700 Content-Transfer-Encoding: quoted-printable Message-ID: <0D27F132-296F-4034-BB02-82E8453B5E87@couchbase.com> References: To: X-Mailer: Apple Mail (2.1877.7) X-Virus-Checked: Checked by ClamAV on apache.org On Apr 15, 2014, at 8:59 PM, Suraj Kumar wrote: >> - To modify an attribute that is involved in a relationship, a >> "transactional update" API must be used. All the related documents = for >> those change(s), must also be submitted through this API = "bulk_doc"-like >> API (perhaps bulk_docs itself?). I don=92t think _bulk_docs will provide a transactional update even on a = single shard/node =97 the semantics will be the same as issuing a bunch = of individual PUT requests one after the other, i.e. someone else can = sneak in and update a doc in between two of your updates. There are = warnings about this in the API docs (at least there were in the old = docs; haven=92t checked the new ones.)=20 There used to be an =93all or nothing=94 mode to _bulk_docs a long time = ago that did provide a transactional update, but apparently it was = removed because it couldn=92t be supported in a clustered environment = (BigCouch). [The usual disclaimer: I=92m not familiar with the code inside CouchDB, = only its behavior.] =97Jens PS: Removing the dev@ group from the reply because (a) I=92m not = subscribed to that, and (b) it=92s off-topic.=