Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit the number of revisions in Couchdb

Tags:

couchdb

Is there a way to limit the number of revisions in couchdb? Something along the lines of a hard limit in a config file. I am aware of the fact that I could periodically compact the database, but somehow it feels like a hack. Is there a better way?

like image 316
Anvar Avatar asked Jan 21 '10 09:01

Anvar


1 Answers

There's no configurable limit, primarily because CouchDB uses append-only storage, i.e. it promises to only ever write to the end of a file and never change anything in the middle. As a result a configurable limit is meaningless.

Compaction is your only option. There has been some talk about automatically triggered compaction on the mailing lists but it can only be triggered manually for now.

like image 72
Matt Goodall Avatar answered Sep 16 '22 11:09

Matt Goodall