From what I have observed:
- For every document you create, a revision-manager document is also created. This revision-manager keeps track of the latest revision and also maintains a history of all revisions in an array.
- Every time you update a document, a new document is created (whyyyyy???). The revision-manager document's latest pointer points to this new document and adds the previous document to its revision history list.
- So, in every update operation Sync-Gateway is adding a new document and also modifying revision-manager document.
This is very inefficient way of doing version control where a copy of the whole document is maintained for version control instead of just the diff as this is going to take a lot of space. (For example : It is taking 8.03MB of disk space for doing 500 taps on a single todo item in the "GrocerySync-Android" sample app. Also, the revision manager document has become greater than 2.5 kb and I am getting a message saying you cannot modify a document more than 2.5 kb in size. Why????)
Questions:
- What is the _sync:local: document about?
- Is it possible to turn off this default behaviour of creating a new document on update and keeping just the latest copy. (One way could be to delete older revs in the client but I guess this would not modify the revision-manager document.)