Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 30095 invoked from network); 18 Nov 2009 23:02:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Nov 2009 23:02:04 -0000 Received: (qmail 64607 invoked by uid 500); 18 Nov 2009 23:02:04 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 64457 invoked by uid 500); 18 Nov 2009 23:02:03 -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 64389 invoked by uid 99); 18 Nov 2009 23:02:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2009 23:02:03 +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; Wed, 18 Nov 2009 23:02:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3FF45234C48C for ; Wed, 18 Nov 2009 15:01:40 -0800 (PST) Message-ID: <238610710.1258585300260.JavaMail.jira@brutus> Date: Wed, 18 Nov 2009 23:01:40 +0000 (UTC) From: "Matt Goodall (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Reopened: (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 ] Matt Goodall reopened COUCHDB-188: ---------------------------------- Just came across this issue and tested against the 0.10 branch. It's still happening, I don't believe it should ever have been closed. > _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.