Skip to content

Commit 89780e3

Browse files
author
Chris Elder
committed
[FAB-5665] Cleanup of old CouchDB document revisions
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 <chris.elder@us.ibm.com>
1 parent f22c3ac commit 89780e3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

images/couchdb/local.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ n = 1
3636
; for 100 million documents, q=10 -- at a minimum
3737
q = 8
3838

39+
;This is a default rule for all databases.
40+
;When database fragmentation (unused versions) reaches 30% of the total
41+
;file size, the database will be compacted.
42+
[compactions]
43+
_default = [{db_fragmentation, "30%"}, {view_fragmentation, "30%"}]
44+
;Optional compaction default that will only allow compactions from 11PM to 4AM
45+
;_default = [{db_fragmentation, "30%"}, {view_fragmentation, "30%"}, {from, "23:00"}, {to, "04:00"}]
46+
47+
;Database compaction settings.
48+
;Databases will be checked every 300s (5min)
49+
;Databases less than 256K in size will not be compacted
50+
[compaction_daemon]
51+
check_interval = 300
52+
min_file_size = 256000
53+
3954
[log]
4055
writer = file
4156
file = /opt/couchdb/logs/couchdb.log

0 commit comments

Comments
 (0)