This is one of those "I know I shouldn't do this but it's oh so convenient." questions. Sorry about that.
I plan to use CouchDB for storing a bunch of documents and keeping their entire revision history. CouchDB does the versioning automatically, but it is strongly discouraged for programmer's use:
"You cannot rely on document revisions for any other purpose than concurrency control."
From what I've found on the CouchDB wiki, the versions can get deleted either during compaction or during replication. As far as I can tell, Compaction must always be triggered manually and Replication occurs only when there's more than one database server.
The question is: if I won't run compaction and will use only single database instance for my documents, can I just use CouchDB's document versioning and expect it to work?
What other problems I might run into? E.g. does not running compaction hurt the performance or consume significantly more disk space (than if I did handle the versioning manually)?
If you reformulate the sentence a bit, it says: "Any update, regardless how minor can completely change the behavior. We guarantee you can use it for concurrency, but nothing else."
Therefore I would not rely on it because in our industry, stuff like that will haunt you in 6 months, unless you can absolutely guarantee that you never, ever update CouchDB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With