[
https://issues.apache.org/jira/browse/COUCHDB-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16012980#comment-16012980
]
Paul Kuruvilla commented on COUCHDB-3418:
-----------------------------------------
It does, thanks :)
I went looking for more details, and found a reference in the
[docs|http://docs.couchdb.org/en/2.0.0/api/database/misc.html#post--db-_purge]
bq. Normal deletion of a document within CouchDB does not remove the document
from the database, instead, the document is marked as _deleted=true (and a new
revision is created). This is to ensure that deleted documents can be
replicated to other databases as having been deleted. This also means that you
can check the status of a document and identify that the document has been
deleted by its absence.
> _changes returns a single item that says a doc is deleted
> ---------------------------------------------------------
>
> Key: COUCHDB-3418
> URL: https://issues.apache.org/jira/browse/COUCHDB-3418
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Paul Kuruvilla
>
> I discovered this while working on maintaining a replica of the npm registry
> (https://replicate.npmjs.com) for Gratipay (https://gratipay.com).
> When I hit the {{/registry/_changes}} endpoint with a filter for {{doc_id =
> 'adam-test'}}, I get back a single change which says that the doc was
> deleted. This looks like a bug, because I'd expect that every 'deleted'
> change would have a corresponding change for when the doc was created.
> (Please correct me if my understanding is wrong)
> Here is a cURL command to replicate the issue:
> {code}
> curl -XPOST -H "Content-Type: application/json"
> https://replicate.npmjs.com/registry/_changes\?limit\=10\&filter\=_doc_ids -d
> '{"doc_ids": ["adam-test"]}'
> {code}
> The output I receive is:
> {code}
> {
> "results": [
> {"seq":1908160,"id":"adam-test","changes":[{"rev":"2-a543a8082c03a641a098fbe39e58afed"}],"deleted":true}
> ],
> "last_seq":1916520
> }
> {code}
> This was the first such occurrence we hit in the ~ 4 million changes that
> we've processed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)