Skip to content

Commit

Permalink
[FAB-5665] Cleanup of old CouchDB document revisions
Browse files Browse the repository at this point in the history
Fabric does not utilize couchdb document replication
or old document revisions. As such, the number of revisions
that couchdb maintains should be reduced. This can be done
by activating the compaction daemon with a generic rule
in the local.ini to cover all databases.

Change-Id: I846536d5d0d00171f9e5135fb48ff1127641e8a7
Signed-off-by: Chris Elder <[email protected]>
  • Loading branch information
Chris Elder committed Aug 30, 2017
1 parent f22c3ac commit 89780e3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions images/couchdb/local.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ n = 1
; for 100 million documents, q=10 -- at a minimum
q = 8

;This is a default rule for all databases.
;When database fragmentation (unused versions) reaches 30% of the total
;file size, the database will be compacted.
[compactions]
_default = [{db_fragmentation, "30%"}, {view_fragmentation, "30%"}]
;Optional compaction default that will only allow compactions from 11PM to 4AM
;_default = [{db_fragmentation, "30%"}, {view_fragmentation, "30%"}, {from, "23:00"}, {to, "04:00"}]

;Database compaction settings.
;Databases will be checked every 300s (5min)
;Databases less than 256K in size will not be compacted
[compaction_daemon]
check_interval = 300
min_file_size = 256000

[log]
writer = file
file = /opt/couchdb/logs/couchdb.log
Expand Down

0 comments on commit 89780e3

Please sign in to comment.