From what I have understood, to update a document you have to always create a new document (revision).
Consider the following scenario:
Suppose if the user is creating a lot of edits in a short period of time. For example, if the user is continuously tapping on a list-item in a TODO app.
Given the fact that, we always create a copy of the document on every update, this would take a lot of space on Couchbase server. I did 500 taps on a list-item in GrocerySync app and the disk usage shot up by 6 MB in couchbase server. Yes, these documents (or revisions) eventually get cleaned up but even if it does, the revision-manager document for this document will just bloat up.
So, is it possible to edit or replace an existing document revision if it has not been synced with the sync-gateway?
(To handle this, I am planing to sync with sync-gateway in my app every 5 secs. So, for every 5 sec only one revision will be synced.)
Also, how can I control sync? I want to manually trigger a sync.