Question

So I read this on the couchdb wiki page - _revs_limit defines a upper bound of document revisions which CouchDB keeps track of, even after Compaction.

But when I try to retrieve an older revision (after compaction) which is within the _revs_limit range - I get a 404 Doc Not Found. I am simply doing a GET on docid and old_revid

Can anyone advise on how to keep/fetch say 'n' number of older revisions of a document even after compaction

·

Was it helpful?

Solution

No, compaction removes all previous revisions, and that cannot be configured. It should also be noted that the revision numbers are not a mechanism of version control, instead it is purely concurrency-control/conflict-prevention.

You'll need to use another method to get document versioning, such as the ones listed in this blog post or this stackoverflow answer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top