couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1141) Docs deleted via PUT or POST do not have contents removed.
Date Wed, 27 Apr 2011 15:31:03 GMT


Paul Joseph Davis commented on COUCHDB-1141:

That commit looks like its just the ability to see the body, not the enabling part. Unless
I'm mistaken this feature has always existed, just no one has used it.

I see the benefits of having such a capability but seeing as there's such a lack of awareness
even by people that have worked with CouchDB internals, it seems like we need to have a behavior
change so that it becomes a bit more obvious why things work the way they are.

The simplest change that would make this fairly obvious is to just return the doc body in
the 404 response to a GET request. So instead of {"not_found": "deleted"} we would return
(usually) {"_id": "foo", "_rev": "1-234223424", "_deleted": true} And then if people had extra
tombstone info it would just be in the doc body. Though we still haven't addressed whether
attachments should be removed or kept.

The second bit of functionality that seems like it'd be necessary is to be able to DELETE
a deleted doc somehow. As it is, it seems like the only way to get rid of deleted doc bodies
is to resurrect them and then DELETE them again. Seems like being able to issue a delete against
the 404 would be better (though seems un HTTP, though I can't think of a clause in the RFC
that addresses this directly, also, the RFC does make distinctions between unknown resources
and resources that are known to not be available, so maybe precedent?)

Anyone have thoughts? Open a new ticket?

> Docs deleted via PUT or POST do not have contents removed.
> ----------------------------------------------------------
>                 Key: COUCHDB-1141
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>         Environment: All
>            Reporter: Wendall Cada
>            Assignee: Robert Newson
>             Fix For: 1.1.1, 1.2
> If a doc is deleted via -X DELETE, the resulting doc contains only id/rev_deleted:true.
However, if a doc is deleted via PUT or POST, through adding _deleted:true, the entire contents
of the doc remains stored. Even after compaction, the original document contents remain.
> This issue is causing databases with large docs to become bloated over time, as the original
doc contents remain in the database even after being deleted.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message