Is it really wrong to version documents using CouchDB's default behaviour?
Posted
by Tomas Sedovic
on Stack Overflow
See other posts from Stack Overflow
or by Tomas Sedovic
Published on 2010-04-26T23:10:56Z
Indexed on
2010/04/27
2:03 UTC
Read the original article
Hit count: 336
couchdb
|versioning
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)?
© Stack Overflow or respective owner