From dev-return-11248-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Wed Aug 11 09:56:43 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 39281 invoked from network); 11 Aug 2010 09:56:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Aug 2010 09:56:43 -0000 Received: (qmail 31579 invoked by uid 500); 11 Aug 2010 09:56:42 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 31221 invoked by uid 500); 11 Aug 2010 09:56:40 -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 31213 invoked by uid 99); 11 Aug 2010 09:56:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Aug 2010 09:56:38 +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; Wed, 11 Aug 2010 09:56:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7B9uH1I008339 for ; Wed, 11 Aug 2010 09:56:17 GMT Message-ID: <26153993.272751281520577540.JavaMail.jira@thor> Date: Wed, 11 Aug 2010 05:56:17 -0400 (EDT) From: "Klaus Trainer (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-853) Update conflict after recreating a deleted document In-Reply-To: <18500928.272371281518598370.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-853?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D128= 97199#action_12897199 ]=20 Klaus Trainer commented on COUCHDB-853: --------------------------------------- This behaviour has nothing to do with deleting and recreating a document. I= also wouldn't call it a bug, since you need to specify the revision number= in the PUT request's body instead of as a query parameter. Accordingly, you put your PUT request better like this: curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"_rev\":\"= 3-0c7606241b31f0566c527cd2a8c16367\" , \"kuerzel\":\"ABO\"}"=20 The first PUT request after the DELETE only succeeds, because after a DELET= E, it isn't necessary to specify a revision number (which is quite reasonab= le). Anyway, the rev query parameter that you specified in the PUT request = is ignored. > Update conflict after recreating a deleted document > --------------------------------------------------- > > Key: COUCHDB-853 > URL: https://issues.apache.org/jira/browse/COUCHDB-853 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 0.11.1 > Environment: Win Server 2008 R2, CouchDB 0.11.1 > Reporter: Andr=C3=A9 B=C3=B6gge > Priority: Critical > > The problem occurs after deleting and recreating a document. I got an upd= ate conflict writing the document after i recreated it.=20 > curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_ABO -d "{\"name\":= \"ABO\"}" > --> {"ok":true,"id":"test_doc_ABO","rev":"1-d51b77d476e0aad1f9990e9a85849= 740"} > D:\Programme\Curl>curl -X DELETE http://oz-lifecycle:5984/meine_db/test_d= oc_ABO?rev=3D"1-d51b77d476e0aad1f9990e9a85849740" > --> {"ok":true,"id":"test_doc_ABO","rev":"2-282f9cf6e648dcce08c426ffbf04c= 635"} > D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_= ABO -d "{\"name\":\"ABO\"}" > --> {"ok":true,"id":"test_doc_ABO","rev":"3-0c7606241b31f0566c527cd2a8c16= 367"} > D:\Programme\Curl>curl -X PUT http://oz-lifecycle:5984/meine_db/test_doc_= ABO?rev=3D"3-0c7606241b31f0566c527cd2a8c16367" -d "{\"kuerzel\":\"ABO\"}" > --> {"error":"conflict","reason":"Document update conflict."} --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.