{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3603","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3603/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3603/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3603/events","html_url":"https://github.com/pouchdb/pouchdb/pull/3603","id":60031076,"number":3603,"title":"(#3578) - Tests for ddoc filtering, deleted docs not replicated","user":{"login":"sphaso","id":4958220,"avatar_url":"https://avatars.githubusercontent.com/u/4958220?v=3","gravatar_id":"","url":"https://api.github.com/users/sphaso","html_url":"https://github.com/sphaso","followers_url":"https://api.github.com/users/sphaso/followers","following_url":"https://api.github.com/users/sphaso/following{/other_user}","gists_url":"https://api.github.com/users/sphaso/gists{/gist_id}","starred_url":"https://api.github.com/users/sphaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphaso/subscriptions","organizations_url":"https://api.github.com/users/sphaso/orgs","repos_url":"https://api.github.com/users/sphaso/repos","events_url":"https://api.github.com/users/sphaso/events{/privacy}","received_events_url":"https://api.github.com/users/sphaso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-05T23:02:00Z","updated_at":"2015-03-07T19:14:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pouchdb/pouchdb/pulls/3603","html_url":"https://github.com/pouchdb/pouchdb/pull/3603","diff_url":"https://github.com/pouchdb/pouchdb/pull/3603.diff","patch_url":"https://github.com/pouchdb/pouchdb/pull/3603.patch"},"body":"I've written two simple tests that will probably clarify things. Basically, when doing filtered replication:\r\n- deleted documents that used to pass the filter are not replicated anymore (i.e. still present locally)\r\n- changed documents that used to pass the filter (change is on the condition necessary for the doc to pass) are not replicated anymore (i.e. still present locally).\r\n\r\nAs mentioned in #3578 this breaks the idea of two-ways-syncing remote-local dbs.\r\nPlease let me know if \\ how I can improve the tests or any misunderstanding on my part."},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/77704792","html_url":"https://github.com/pouchdb/pouchdb/pull/3603#issuecomment-77704792","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3603","id":77704792,"user":{"login":"sphaso","id":4958220,"avatar_url":"https://avatars.githubusercontent.com/u/4958220?v=3","gravatar_id":"","url":"https://api.github.com/users/sphaso","html_url":"https://github.com/sphaso","followers_url":"https://api.github.com/users/sphaso/followers","following_url":"https://api.github.com/users/sphaso/following{/other_user}","gists_url":"https://api.github.com/users/sphaso/gists{/gist_id}","starred_url":"https://api.github.com/users/sphaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphaso/subscriptions","organizations_url":"https://api.github.com/users/sphaso/orgs","repos_url":"https://api.github.com/users/sphaso/repos","events_url":"https://api.github.com/users/sphaso/events{/privacy}","received_events_url":"https://api.github.com/users/sphaso/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T19:14:13Z","updated_at":"2015-03-07T19:14:13Z","body":"About the second issue:\r\nOk, I'll delete the second test then. \r\nThis of course raises the issue of \"how?\". Do you have any recipe? Obviously if the document shouldn't pass the filter, you want to delete it from the end-point of the replication (without having the deletion replicate back to CouchDB!). I can think of some ways but they sound more like hacks than proper solutions (e.g. add the deleted value to another field and filter on both...).\r\n\r\nAbout live \\ single-shot replication:\r\nThank you. I was in doubt about that, unfortunately adding \"live: true\" was giving me a timeout error :\\"}}