Limit Couchdb Changes

Is there a way to limit the number of changes in couchdb? Something along the lines of the hard limit in the configuration file. I am aware that I can periodically compact the database, but for some reason this seems like a hack. Is there a better way?

+7
couchdb
source share
2 answers

There is no configurable limit, primarily because CouchDB uses storage only for applications, i.e. it promises to write only at the end of the file and never change anything in the middle. As a result, a custom limit does not make sense.

Sealing is your only option. There was some talk of automatically starting compaction on the mailing lists, but it can only be started manually.

+8
source share

It is possible for each database through this HTTP API:

PUT /{db}/_revs_limit 

Sets the maximum number of document versions that CouchDB will track, even after compression has occurred. You can set the audit limit for the database using the scalar integer of the limit that you want to set as the request body.

See https://docs.couchdb.org/en/stable/api/database/misc.html#db-revs-limit

+1
source share

All Articles