From dev-return-3541-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Mon Mar 23 16:48:14 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 93349 invoked from network); 23 Mar 2009 16:48:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2009 16:48:12 -0000 Received: (qmail 57633 invoked by uid 500); 23 Mar 2009 16:48:12 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 57573 invoked by uid 500); 23 Mar 2009 16:48:12 -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 57563 invoked by uid 99); 23 Mar 2009 16:48:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 16:48:12 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 16:48:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 263F9234C003 for ; Mon, 23 Mar 2009 09:47:51 -0700 (PDT) Message-ID: <1890861582.1237826871141.JavaMail.jira@brutus> Date: Mon, 23 Mar 2009 09:47:51 -0700 (PDT) From: "Chris Anderson (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-292) A deleted document may be resaved with an old revision and is then considered undeleted In-Reply-To: <612638336.1237278530450.JavaMail.jira@brutus> 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-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688321#action_12688321 ] Chris Anderson commented on COUCHDB-292: ---------------------------------------- I was able to duplicate this on my machine. Paul if you can possibly rebuild this as a JavaScript test suite test (perhaps a patch to basics.js) we can start to look for the right fix. At the end of my session I tried: $: curl -X GET localhost:5984/scratch/foo?meta=true {"_id":"foo","_rev":"3-2144795776","_revs_info":[{"rev":"3-2144795776","status":"available"},{"rev":"2-4259004717","status":"available"},{"rev":"1-1189092513","status":"available"}],"_deleted_conflicts":["3-1788894625"]} So it looks like I have a deleted conflict. I'm not sure what this means but it seems relevant to the underlying model. > A deleted document may be resaved with an old revision and is then considered undeleted > --------------------------------------------------------------------------------------- > > Key: COUCHDB-292 > URL: https://issues.apache.org/jira/browse/COUCHDB-292 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 0.9 > Reporter: Paul Carey > Fix For: 0.10 > > > If a document is deleted, a PUT request may be issued with the same revision that was passed to the DELETE request. When this happens the previously deleted document is assigned a new revision and is no longer considered deleted. > This behaviour is new within the last few weeks. > The following curl session illustrates the issue. > 08:18 : ~ $ curl -X PUT -d '{"_id":"foo"}' localhost:5984/scratch/foo > {"ok":true,"id":"foo","rev":"1-3690485448"} > 08:19 : ~ $ curl -X PUT -d '{"_id":"foo","_rev":"1-3690485448"}' localhost:5984/scratch/foo > {"ok":true,"id":"foo","rev":"2-966942539"} > 08:19 : ~ $ curl -X DELETE localhost:5984/scratch/foo?rev="2-966942539" > {"ok":true,"id":"foo","rev":"3-421182311"} > 08:20 : ~ $ curl -X GET localhost:5984/scratch/foo > {"error":"not_found","reason":"deleted"} > 08:20 : ~ $ curl -X PUT -d '{"_id":"foo","_rev":"2-966942539"}' localhost:5984/scratch/foo > {"ok":true,"id":"foo","rev":"3-1867999175"} > 08:20 : ~ $ curl -X GET localhost:5984/scratch/foo > {"_id":"foo","_rev":"3-1867999175"} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.