Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 97370 invoked from network); 2 Feb 2010 00:58:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 00:58:42 -0000 Received: (qmail 89185 invoked by uid 500); 2 Feb 2010 00:58:42 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 89089 invoked by uid 500); 2 Feb 2010 00:58:42 -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 89079 invoked by uid 99); 2 Feb 2010 00:58:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 00:58:42 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 00:58:39 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B453C234C1EE for ; Mon, 1 Feb 2010 16:58:18 -0800 (PST) Message-ID: <1910428913.13151265072298736.JavaMail.jira@brutus.apache.org> Date: Tue, 2 Feb 2010 00:58:18 +0000 (UTC) From: "Jan Lehnardt (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-188) _bulk_docs fails when deleting and adding a doc with the same id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jan Lehnardt updated COUCHDB-188: --------------------------------- Priority: Blocker (was: Major) Fix Version/s: (was: 0.9) 0.11 Bump to 0.11 and set blocking. > _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 > Priority: Blocker > Fix For: 0.11 > > > 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.