From dev-return-12094-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Oct 07 07:39:55 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 87983 invoked from network); 7 Oct 2010 07:39:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Oct 2010 07:39:54 -0000 Received: (qmail 587 invoked by uid 500); 7 Oct 2010 07:39:54 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 332 invoked by uid 500); 7 Oct 2010 07:39:54 -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 323 invoked by uid 99); 7 Oct 2010 07:39:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 07:39:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 07:39:51 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o977dVh6023356 for ; Thu, 7 Oct 2010 07:39:31 GMT Message-ID: <6767126.21511286437171344.JavaMail.jira@thor> Date: Thu, 7 Oct 2010 03:39:31 -0400 (EDT) From: "Klaus Trainer (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-911) Repeating a doc._id in a _bulk_docs request results in erroneous "Document conflict" error In-Reply-To: <6323846.20571286430991439.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918807#action_12918807 ] Klaus Trainer commented on COUCHDB-911: --------------------------------------- Trying your example request with CouchDB 1.0.1, I get the following error message: {"error":"bad_request","reason":"invalid UTF-8 JSON: <<\"{\\\"docs\\\": [{\\\"_id\\\":\\\"foo\\\"}, {\\\"_id\\\",\\\"foo\\\"}]}\">>"} When replacing the comma with a colon, I get this result: {"ok":true,"id":"87bea69a9e2eb988d467183b6100084a","rev":"1-ad4b328fcf36f99be059e435c1c32c1c"} Obviously, that's not a CouchDB issue. Why not just report Cloudant/BigCouch issues that are no CouchDB issues to Cloudant or rather to the BigCouch project. - Klaus > Repeating a doc._id in a _bulk_docs request results in erroneous "Document conflict" error > ------------------------------------------------------------------------------------------ > > Key: COUCHDB-911 > URL: https://issues.apache.org/jira/browse/COUCHDB-911 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.0 > Environment: Cloudant BigCouch EC2 node > Reporter: Jay Nelson > Priority: Minor > Original Estimate: 48h > Remaining Estimate: 48h > > Repeating an "_id" in a _bulk_docs post data file results in both entries being reported as document conflict errors. The first occurrence actual inserts into the database, and only the second occurrence should report a conflict. > curl -d '{ "docs": [ {"_id":"foo"}, {"_id","foo"} ] }' -H 'Content-Type:application/json' -X POST http://appadvice.cloudant.com/foo/_bulk_docs > [{"id":"foo","error":"conflict","reason":"Document update conflict."},{"id":"foo","error":"conflict","reason":"Document update conflict."}] > But the database shows that one new document was actually inserted. > Only the second occurrence should report conflict. The first occurrence should report the "_rev" property of the newly inserted doc. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.