couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-292) A deleted document may be resaved with an old revision and is then considered undeleted
Date Mon, 23 Mar 2009 16:47:51 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Anderson updated COUCHDB-292:
-----------------------------------

    Fix Version/s: 0.10

> 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.


Mime
View raw message