Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 84866 invoked from network); 9 Apr 2008 19:02:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2008 19:02:21 -0000 Received: (qmail 33431 invoked by uid 500); 9 Apr 2008 19:02:21 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 33402 invoked by uid 500); 9 Apr 2008 19:02:21 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 33393 invoked by uid 99); 9 Apr 2008 19:02:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2008 12:02:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 72.14.220.155 as permitted sender) Received: from [72.14.220.155] (HELO fg-out-1718.google.com) (72.14.220.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Apr 2008 19:01:36 +0000 Received: by fg-out-1718.google.com with SMTP id 22so2611048fge.26 for ; Wed, 09 Apr 2008 12:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Jw9wjtYrUh10z09XzCpnsetKfr2rlkTq4iGip20oVU8=; b=BpaTkOA4QcxwylBAKYUisHFfcnyOEschCQZoIpEXVmR1o3frDF0gtz4wT+c/XeNoU6pr5GKSBAfpx/qA/0VBcN9eawlGezRiD9sQ4X6JJ1X37W5oHGOuAbH5Z3yoD4VX+pAuUHNAAl80Ajbz/4aJQ2w8mTPFex3OkI65r2PYe2Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=V4UfriuocqdpeqCNv9nyUJr0Z+GlLGTvKeoxOJfKCJlBa+KRjOuN2idfPPbkmRF5SuJTFsGRc7mTJ1ezVmFerbiRFiHeamS0FH1KYjx3QHXOvObFvIzONIOudYfwRlk1SCVfMAOPNb/fSvtFLptTgX4Wq3AhCtgk0P/27j1kCUw= Received: by 10.86.72.15 with SMTP id u15mr1110634fga.11.1207767705329; Wed, 09 Apr 2008 12:01:45 -0700 (PDT) Received: by 10.86.57.13 with HTTP; Wed, 9 Apr 2008 12:01:45 -0700 (PDT) Message-ID: Date: Wed, 9 Apr 2008 12:01:45 -0700 From: "Chris Anderson" Sender: jchris@gmail.com To: couchdb-user@incubator.apache.org Subject: Re: multi-document acid transactions In-Reply-To: <0433F5A7-24B9-4194-91CF-631282DCD975@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <0433F5A7-24B9-4194-91CF-631282DCD975@gmail.com> X-Google-Sender-Auth: d36787a430b21f32 X-Virus-Checked: Checked by ClamAV on apache.org Damien, I can see the value of this feature, but there's also a lot of value in being able to do fire-and-forget multi document inserts. In my application I'm relying on uniq document id semantics, and was very happy to see that bulk inserts would create some but not all documents when the _rev property was absent and some ids were taken. It would extremely useful if there was a parameter that could choose not to run the inserts in a transaction. I'll understand if that is infeasible. If you don't have time/inclination to make the change, I'd happily pour over the diffs to try to add the option. Perhaps you can give a pointer to the check-in? Thanks for everything! Chris On 4/9/08, Damien Katz wrote: > FYI, CouchDB now has multi-document ACID transactions. This were > checked in last week as part of a larger refactoring. > > To do a multi-document update, simply use the bulk update POST option. > If any document fails to commit due to conflict (or whatever reason), > then all the documents fail. You can also delete documents in the > same bulk transaction, by setting the _deleted member in the document > to true. > > So now if all transactions happen on the single instance, you can use > bulk transactions and keep relationships and heirarchies amongst > documents intact at all times. But once the application is > distributed, then you potentially lose the ACID properties of the > updates, as the replication system won't preserve the atomicity of the > multi-document update. > > This mean I don't recommend relying on bulk updates to preserve inter- > document ACID properties in distributed applications, but it's > workable for applications that use only a single database instance. > -- Chris Anderson http://jchris.mfdz.com