I know sometimes it’s a good feature, but if i need to store large amount of data, it’s unnecessary other “meta-data” around the data itself.
Is there any way how to disable versioning in CouchDB, or do i need to use different DB engine, like Mongo?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Versioning isn’t a feature of CouchDB it is a core function of the way it works writing the data to the disk and preforms replication conflict resolution with other nodes. It is not a history mechanism.
It is very unfortunate that there isn’t a better term than
versionfor referring to the previous copies of the documents. Becauseversionto most developers means somethinghistoricalthat is warehoused. That isn’t what it is intended to be used as at all in CouchDB.It is plastered all over the CouchDB documentation to not rely on previous versions as backups or a versioning system, that they can potentially disappear at anytime, because they are used for replication conflict detection mainly. But the simple fact is this isn’t a feature it is just how CouchDB works.
The only way to remove the past versions is to compact the database periodically. In the current version of CouchDB this can be enabled with a script that hooks into document updates and fires off semi-automatic compaction based on a high water mark threshold. Usually this is done manually after a large set of documents are updated in a batch a you know that this might be beneficial from an application specific standpoint.
That said, if you aren’t updating documents no history is generated and this is not needed.