Hi everyone,
I plan to implement a cleanup service for our CB cluster and I want to make sure I’m doing this right.
Basically, we use CB for a mobile app and never done any purging. Due to the nature of our app CB nodes contain a lot of docs that can be purged. More specifically docs that only exist as children of other docs and no longer referenced by any parent docs.
My plan is to write a service that listens for CB changes and builds lists of docs that can be safely purged. All listening/ purging will be done via the SGs.
The reason we want to do this housekeeping server-side is to avoid bugs on individual platforms. Is that the right approach? Is there a better way to do this?
Also, I have two questions regarding purging docs:
-
If a doc is purged and then a mobile device pushes a new rev for that doc, what will happen? is it just an error that will be ignored (i.e the rev will be ignored as the parent rev is missing) or will it affect further syncing in some other way?
-
Server-side, are purges replicated across CB nodes? i.e. if I issue a purge request to a SG connected to a CB node, will other CB nodes (connected to their own SGs) receive it -or- do I have to issue the request on each one of the SGs for each of CB nodes?
Thank you!