[
https://issues.apache.org/jira/browse/COUCHDB-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025843#comment-13025843
]
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: https://issues.apache.org/jira/browse/COUCHDB-1141
> 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: http://www.atlassian.com/software/jira