kdoran commented on issue #1221: `_changes` filtered on `_doc_ids` returns unexpected `last_seq` URL: https://github.com/apache/couchdb/issues/1221#issuecomment-377190829 @wohali yup, sorry for the delay! Here's a quick js example I ran in the chrome devtools console while on the fauxton page on my local CouchDB, which is 2.1.0 as a single node. The same discrepancy between `seq` and `last_seq` also happens when running this on a remote EC2 CouchDB running 2.1.1 also as a single node: ``` couchUrl = 'http://localhost:5984/' dbName = 'sync-test' promise = fetch(couchUrl + dbName + '/_all_docs?limit=1&descending=true', { headers: {'Content-Type': 'application/json'}, credentials: 'include' } ).then(resp => resp.json()).then(response => response.rows[0].id) .then(doc_id => { return fetch(couchUrl + dbName + '/_changes?limit=10&filter=_doc_ids', { method: 'POST', body: JSON.stringify({ doc_ids: [ doc_id ] }), headers: {'Content-Type': 'application/json'} } ).then(resp => resp.json()).then(resp => JSON.stringify(resp, null, 2)) }) Promise.resolve( promise ).then(console.log) ``` the response: ``` { "results": [ { "seq": "94-g1AAAAB5eJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyvRGI-iPBYgydAApP6D1GYwJ2rnAgXYU1MtUsyNjLDpywIABfcnAA", "id": "9::remote", "changes": [ { "rev": "1-967a00dff5e02add41819138abb3284d" } ] } ], "last_seq": "128-g1AAAACbeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUklMiTV____PyuDOdEnFyjAnmaanGZsmoRNAx5j8liAJEMDkPoPNc0EbFpqqkWKuZERNn1ZALTyMYU", "pending": 0 } ``` and here is the result when I run that same snippet on my local 1.6.1 CouchDB: ``` { "results": [ { "seq": 9, "id": "9::remote", "changes": [ { "rev": "1-967a00dff5e02add41819138abb3284d" } ] } ], "last_seq": 1019 } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
