Paul Kuruvilla created COUCHDB-3418:
---------------------------------------

             Summary: _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)

Reply via email to