Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 55821 invoked from network); 24 Jan 2009 20:29:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2009 20:29:38 -0000 Received: (qmail 19772 invoked by uid 500); 24 Jan 2009 20:29:37 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 19734 invoked by uid 500); 24 Jan 2009 20:29:37 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 19723 invoked by uid 99); 24 Jan 2009 20:29:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 12:29:37 -0800 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of matt.goodall@gmail.com designates 209.85.128.190 as permitted sender) Received: from [209.85.128.190] (HELO fk-out-0910.google.com) (209.85.128.190) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 20:29:29 +0000 Received: by fk-out-0910.google.com with SMTP id f40so2000186fka.11 for ; Sat, 24 Jan 2009 12:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=AkEZ2O76m6hHR1zyMPWSbn5l3vCK9yJu16dUGhXL5VI=; b=ANuD03+X3gDehqAJjV/4qHd6vN/W05jPYJPj10K8iqx2lBiZ+dYQqN7Rkl7W0nsO9t X4eCLoQcdBYUNMekLtGEInzaRbLPv8PYJqPVpLQmHSyk4RnAS7Sg3kr3Et9xrXKjpMVy t1M1AdZrturMKZhqC29feYjt/I9zCPzgn9ivg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SmUX5GxQgX7LrQ13r5OyuTKWJyi8p6hJ1VPpRlSsoYrcrZJ+XY8sQjK8bfe/2GjLh/ tGvRynxwLzxVF6DPzrv6BpaCvvOC2F4eb2U4gJDklFg1G9uMFEYSIZD3tPevIWbv50YC 5bhUM6JM88sWlxOrqDX7J5MinC+1SFip/xrT8= MIME-Version: 1.0 Received: by 10.181.134.12 with SMTP id l12mr575747bkn.26.1232828948777; Sat, 24 Jan 2009 12:29:08 -0800 (PST) In-Reply-To: <1879902179.1232801519966.JavaMail.jira@brutus> References: <450773094.1230742912301.JavaMail.jira@brutus> <1879902179.1232801519966.JavaMail.jira@brutus> Date: Sat, 24 Jan 2009 20:29:08 +0000 Message-ID: <214c385b0901241229n5376edf2p64a964ce27264246@mail.gmail.com> Subject: Re: [jira] Closed: (COUCHDB-188) _bulk_docs fails when deleting and adding a doc with the same id From: Matt Goodall To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm a bit confused why this was closed. Perhaps a description of the "new behaviour" is available somewhere? The only mention of anything related to a change in _bulk_docs I've *noticed* is about not failing everything in the list of updates (might be nice if that was optional, actually) and the associated error reporting. However, that doesn't necessarily fix the problem I described. Can anyone explain how the planned change fixes things? Thanks, Matt 2009/1/24 Jan Lehnardt (JIRA) : > > [ https://issues.apache.org/jira/browse/COUCHDB-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] > > Jan Lehnardt closed COUCHDB-188. > -------------------------------- > > Resolution: Invalid > Fix Version/s: 0.9 > > bulk update will get a new behaviour in 0.9. Closing > >> _bulk_docs fails when deleting and adding a doc with the same id >> ---------------------------------------------------------------- >> >> Key: COUCHDB-188 >> URL: https://issues.apache.org/jira/browse/COUCHDB-188 >> Project: CouchDB >> Issue Type: Bug >> Components: Database Core >> Affects Versions: 0.9 >> Environment: CouchDB revision 730414. >> Reporter: Matt Goodall >> Fix For: 0.9 >> >> >> CouchDB returns a "412 Precondition Failed" when the list of changes sent to _bulk_docs deletes a document and later creates a document with the same id as the deleted document: >> {"docs": [ >> {"_id": "docid", "_rev": "", "_deleted": true}, >> {"_id": "docid"} >> ]} >> Once fixed, the response JSON document will return the same docid twice in the list but it's presumably ordered consistently with the request data so any client should be able to understand the response. >> Demonstrating the problem using curl is easy enough: >> $ curl -X PUT http://localhost:5984/test >> {"ok":true} >> $ curl -X PUT -d "{}" http://localhost:5984/test/docid >> {"ok":true,"id":"docid","rev":"4140747751"} >> $ curl -X POST -d '{"docs": [{"_id": "docid", "_rev": "4140747751", "_deleted": true}, {"_id": "docid"}]}' http://localhost:5984/test/_bulk_docs >> {"error":"conflict","reason":"Document update conflict."} >> Note: this is likely related to COUCHDB-172. > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > >