incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Database size seems off even after compaction runs.
Date Thu, 22 Dec 2011 21:36:28 GMT
Deleted docs are preserved forever (necessary for eventual consistency).

If you know the doc id of a deleted doc, try GET
host:port/dbname/docname?open_revs=all

You should be able to find your deleted docs via the _changes feed, e.g.;

~ $ curl localhost:5984/foo/_changes
{"results":[
{"seq":2,"id":"bar","changes":[{"rev":"2-91257658886b5692a98d053bb9990b47"}],"deleted":true}
],
"last_seq":2}

B.

On 22 December 2011 21:27, Chris Stockton <chrisstocktonaz@gmail.com> wrote:
> Hello Robert,
>
> On Thu, Dec 22, 2011 at 2:20 PM, Robert Newson <rnewson@apache.org> wrote:
>> Deleted docs take space. If you used the DELETE http method, then it's
>> minimal, but if you just added _deleted:true to your document and
>> saved, then it contains all the data of the previous revision,
>> including all attachments.
>>
>
> Thanks for the response, every single doc listed in _all_docs (only 25
> docs) is on the first revision. Is what you are saying that the user
> could have deleted 49K docs and although they don't exist in _all_docs
> anymore, they are physically on the disk and COMPACTION is not the way
> to get rid of them?
>
> Do you know how can I discard these old documents, or even query to see them?

Mime
View raw message