Closed jjrodrig closed 2 years ago
@jjrodrig there is currently no concept of revs_limit and the revs tree grows indefinitely without any limit on its depth. For typical uses we don't see this as a problem as trees tend to have relatively small depths. In most cases it is an anti-pattern to have highly mutable documents which cause deep revision trees. See this article (Rule 12) for more information.
Currently we don't have a purge operation, but after compaction only the revision metadata (rev id, doc id, and a few other flags) remains, which has a small storage overhead.
Thanks @tomblench for your answer We have two use cases in our application:
As general design rule in our system we try to keep the server databases small trying to improve the filtered replication process. We have implemented a purging process in the server but I don’t see any mechanism to do the same in the mobile device.
I see that you have a started work about Purge operation. Do you discard to include it in the library?
We had considered adding a purge to the local datastore previously and started a prototype, but that work was dropped and purge functionality is not currently in plan.
Hi @ricellis, have there been any updates to this? Are there any plans to work on purging and compaction?
Compaction is already available to remove the bodies and attachments of obsolete revisions. We have no plans to make any changes to the overall revision tree. FWIW Cloudant no longer allows customization of the _revs_limit
server side either (although it is still capped at 1000).
We have no new features planned for this library at this time, but if that changes this feature request is well known and it will definitely be up for consideration.
This library is now end-of-life and this issue won't be fixed.
This issue has been tagged EOL
in case any forks want to import it.
Cloudant/CouchDB allows to restrict the maximum number of revisions per document. This can be defined with the _revs_limit endpoint.
Provides Cloudant Sync a similar mechanism? It would be very helpful to try keep the local document store small when documents with frequent updates are managed.
Also, purge operation could be helpful, Is there any plan to include it?
Please include the following information in your ticket.