_deleted documents

37 views
Skip to first unread message

Brett Harrison

unread,
Jan 28, 2015, 12:20:41 PM1/28/15
to mobile-c...@googlegroups.com
When a document gets marks as deleted does it also get purged from the clients?

If not would it be reasonable to run a view that finds deleted objects and purges them?

Jens Alfke

unread,
Jan 28, 2015, 1:36:31 PM1/28/15
to mobile-c...@googlegroups.com

On Jan 28, 2015, at 9:20 AM, Brett Harrison <brett.h...@musicmastermind.com> wrote:

When a document gets marks as deleted does it also get purged from the clients?

No, for various reasons relating to sync.

If not would it be reasonable to run a view that finds deleted objects and purges them?

You could, but there are potential side effects like:

* If the sync with the server ever has to restart (unlikely but possible) all of the deleted documents will get downloaded again because the replicator will see that the server has them but you don't.
* If you do a peer-to-peer sync with another client that syncs with the same server, the same thing will happen.
* If there's a conflict involving the deletion — e.g. user A deletes the doc, but user B modified the previous live version and then pushed her update — you no longer have any context to detect or handle the conflict. If you purged the doc after receiving A's deletion, then when you receive B's version it will look like that's the unambiguous current version.

—Jens
Reply all
Reply to author
Forward
0 new messages