Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Mobile 2.1
-
DOC-2019-S19-Sep20, DOC-2019-S22-Nov01
-
1
Description
Ref : https://docs.couchbase.com/sync-gateway/2.6/data-routing.html#removing-a-replicated-document
The description of what happens on CBL side is not entirely accurate and its probably details that a developer should not care about
Specifically referring to text below . It would suffice to state that SGW sends down mobile tombstone when document is removed from the channel.
Also in general : This page should refer to relevant sections in Couchbase Lite where appropriate and not describe what goes in within CBL
Subscribers (downstream databases pulling from this database) automatically handle the change. Sync Gateway’s _changes feed includes one more revision of a document after it stops matching a channel. Couchbase Lite creates a special tombstone revision, adding _removed:true property to the entry when this happens.
This algorithm ensures that any views running in Couchbase Lite do not include an obsolete revision. The app code should use views to filter the results rather than just assuming that all documents in its local database are relevant.