{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2848","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2848/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2848/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2848/events","html_url":"https://github.com/pouchdb/pouchdb/issues/2848","id":45572305,"number":2848,"title":"replicate with cloudant emit 'complete' event prematurely .","user":{"login":"khanhlu2013","id":5914159,"avatar_url":"https://avatars.githubusercontent.com/u/5914159?v=3","gravatar_id":"","url":"https://api.github.com/users/khanhlu2013","html_url":"https://github.com/khanhlu2013","followers_url":"https://api.github.com/users/khanhlu2013/followers","following_url":"https://api.github.com/users/khanhlu2013/following{/other_user}","gists_url":"https://api.github.com/users/khanhlu2013/gists{/gist_id}","starred_url":"https://api.github.com/users/khanhlu2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khanhlu2013/subscriptions","organizations_url":"https://api.github.com/users/khanhlu2013/orgs","repos_url":"https://api.github.com/users/khanhlu2013/repos","events_url":"https://api.github.com/users/khanhlu2013/events{/privacy}","received_events_url":"https://api.github.com/users/khanhlu2013/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-12T07:27:55Z","updated_at":"2015-02-25T02:02:38Z","closed_at":null,"body":"I have 7000 doc to replicate from cloudant to local pouchdb\r\n\r\n![screen shot 2014-10-12 at 12 38 06 am](https://cloud.githubusercontent.com/assets/5914159/4605455/af25742e-51e2-11e4-95b4-c60bdbacfd19.png)\r\n\r\n\r\n. as you can see, it took me 3 page refresh/run to fully download 7000 products. on first run, replicate emit complete event when the 'total downloaded doc' = batch_size. on second run it emit complete event when total downloaded doc = 1000. the 3rd time it download the rest. \r\n\r\n. this only happen with cloudant. when i develop locally with Apache CouchDB 1.5.0, i don't experience this problem. Do i miss something?"},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/75891674","html_url":"https://github.com/pouchdb/pouchdb/issues/2848#issuecomment-75891674","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/2848","id":75891674,"user":{"login":"khanhlu2013","id":5914159,"avatar_url":"https://avatars.githubusercontent.com/u/5914159?v=3","gravatar_id":"","url":"https://api.github.com/users/khanhlu2013","html_url":"https://github.com/khanhlu2013","followers_url":"https://api.github.com/users/khanhlu2013/followers","following_url":"https://api.github.com/users/khanhlu2013/following{/other_user}","gists_url":"https://api.github.com/users/khanhlu2013/gists{/gist_id}","starred_url":"https://api.github.com/users/khanhlu2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khanhlu2013/subscriptions","organizations_url":"https://api.github.com/users/khanhlu2013/orgs","repos_url":"https://api.github.com/users/khanhlu2013/repos","events_url":"https://api.github.com/users/khanhlu2013/events{/privacy}","received_events_url":"https://api.github.com/users/khanhlu2013/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T02:02:38Z","updated_at":"2015-02-25T02:02:38Z","body":"It is working for me now with 3.3.1 version"}}