Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 63635 invoked from network); 11 Jan 2010 21:55:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jan 2010 21:55:30 -0000 Received: (qmail 90960 invoked by uid 500); 11 Jan 2010 21:55:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 90890 invoked by uid 500); 11 Jan 2010 21:55: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 90880 invoked by uid 99); 11 Jan 2010 21:55:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2010 21:55:29 +0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.61.9.20] (HELO mail1.nl.clara.net) (212.61.9.20) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2010 21:55:19 +0000 Received: from claranet.nl (bifur.vianetworks.nl [212.61.15.16]) by mail1.nl.clara.net (Postfix) with SMTP id 28347358F84; Mon, 11 Jan 2010 22:54:59 +0100 (CET) Received: from 82.73.244.17 (SquirrelMail authenticated user buyway58) by webmail.claranet.nl with HTTP; Mon, 11 Jan 2010 22:54:59 +0100 (CET) Message-ID: <33916.82.73.244.17.1263246899.squirrel@webmail.claranet.nl> Date: Mon, 11 Jan 2010 22:54:59 +0100 (CET) Subject: Re: Bulk update as a single transaction, possible? From: "Markus Jelsma" To: In-Reply-To: References: X-Priority: 3 Importance: Normal Cc: Reply-To: markus@buyways.nl X-Mailer: SquirrelMail (version 1.2.8) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hello Manuel, Paul is right, a feature like a true multi document transactions with conflict handling does not exist since the CouchDB 0.9 release and for good reasons. You can either attempt to circumvent the issue by rethinking your model as Paul suggests or you can check if your model allows for CouchDB's new all-or-nothing bulk update operations _without_ conflict handling. Please check the wiki on bulk updating [1] for more information on this topic. But you're probably better of in following Paul's suggestion with which you bend the mind to fit the couch instead the other way around. [1] http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API Regards, Manuel de la Pe�a zei: > Hello *, > > I have been working with couchdb (through python) for Ia while and I was > wondering if you could give me a hand with a small problem I'm having. > In my couchdb python application I'd like to be able to perform a bulk > operation in which more than one document is either updated or added to > the database. Currently the python binding does provide a way to perform > a bulk update but this update it is not understood as a single > "transaction" > because, although it uses a single request, the changes are > not sequential in the _changes feed and updates and commits are > individual, that is, if there is an error there rest of the documents > are not rolled back. My question is the following: > > Does couchdb have such a feature that the python bindings is taking > advantage of? > > I do not mind faking the transaction idea from my client code, but I > fear that other applications/parts of the code might work with a > document interval between receiving the result of the bulk update and > the rool back of the operation. Any help would be appreciated. > > Kr, > > Manuel