> On Jan 28, 2015, at 9:20 AM, Brett Harrison 
> <[email protected]> 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

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/87835012-3E8E-45C3-8836-A184A85815D3%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to