add test #7371 documents moving outside replication scope
This PR contains:
- added test to Firestore Replication test file, tests if replication correctly notices docs moving outside of replication scope
Describe the problem you have without this PR
Missing test for issue with Firestore docs moving outside of replication scope https://github.com/pubkey/rxdb/issues/7371
I understand the problem. But I see no way to fix this on the RxDB side atm. If there is no more permission to the doc, the sync will not know about the move-out-of-scope change to that document. Atm docs are expected to either stay inside or outside of the scope, not change that.
I understand the problem. But I see no way to fix this on the RxDB side atm. If there is no more permission to the doc, the sync will not know about the move-out-of-scope change to that document. Atm docs are expected to either stay inside or outside of the scope, not change that.
This should be fixable, because Firestore sends a 'removed event', RxDB just needs to process that.
https://firebase.google.com/docs/firestore/query-data/listen#view_changes_between_snapshots shows an example how to correctly process these changes
If a document moves out of the replication scope because it no longer matches the filters, a 'removed' event is received by Firestore client. I have verified this myself with my application.
I'll check if I can make the necessary modifications to the Firestore Replication plugin, but I don't know if I am sufficiently qualified, will keep you posted
Hi @calvinturbo This PR fails on the CI, please check.
@pubkey I'll start working on it