> On Aug 23, 2014, at 10:06 AM, [email protected] wrote:
> 
> I have an iOS app running on devices A and B, both configured with a 
> continuous push replication to the other. The databases on the devices are in 
> sync with 300 documents that won't be modified. When 100 docs are purged from 
> A (in a 'backgroundTellDatabaseNamed' block) they are replicated back in from 
> B. 
> Is that to be expected ? 

Yes, this is actually correct behavior. Purge is sort of weird — it completely 
forgets about the document and its history, so the next time the replicator 
hears about the document it will think it's new and will download it. This has 
a couple of unexpected side effects:

If A has never pulled from B before, then during the initial scan of B's 
changes feed it will find the purged docs and since it doesn't have them yet 
it'll download them.
If A has pulled from B before, nothing will happen until the next time one of 
those docs is modified on B; then it'll show up in B's changes feed and A will 
pull it again because it doesn't have it.

We inherited the purge feature from CouchDB, but it's becoming apparent that we 
need something smarter, like something in between a purge and a delete. I think 
what would work is a purge that leaves behind a marker saying "don't 
re-download this".

—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/04F65093-2941-4663-A3FD-0809541E4371%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to