Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
3.1.3
-
None
Description
There is a known issue with views index when there is a high number of mutations on a view indexer compaction cannot keep up. This results in the index using all of the disk space. It is worth reading over "Index compaction in view engine" section in on the Couchbase View Engine Internals page. The basic problem is the compaction process ends up in a race with the updater that it can never win.
It is worth mentioning that this problem is accelerated when there are multiple design docs. This is because the schedule compaction only has one process, so if it get stuck the other design docs do not get compacted.
There is a work around, which introduces a delay in the update process:
$ curl -X POST http://Administrator:password@localhost:8091/diag/eval -d \
|
'rpc:eval_everywhere(erlang, apply, [fun() -> couch_config:set("set_views", "throttle_period", "2000") end, []]).'
|
I think we can come up with some better solutions for this problem. I'm happy to discusses a few ideas I have to fix the problem but general I do not like imposing my "fixes" in Mb