Disable compaction daemon on eunit run couch startups #654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 21f9544 enabled the compaction daemon by default. And commit
3afe3ad disabled the compaction daemon at the start of the compaction
daemon tests. Unfortunately, the compaction daemon remains active during
all the other EUnit tests. This has resulted in some strange behaviour,
especially filling the LRU up and
all_dbs_active
errors during teststhat shouludn't be hitting it otherwise (like
couchdb_views_tests:couchdb_1283
which monkeys with max_dbs_open ).I attempted to override the [compactions] _default line in the file
rel/files/eunit.ini but specifying
_default=
or_default=[]
did notprovide the desired behaviour. (This in and of itself is worrying; how would
someone disable the compaction daemon in
local.ini
now?)This change disables the _default config as part of
test_util:start_couch
after startup. This means there is a very briefperiod during which the daemon is running, but in empirical testing the
only thing I've seen it manage to do is compact
_dbs
before beingdisabled.
Tested with
make soak-eunit
for 3 hours; this seems to eliminate theall_dbs_active
error we've been seeing in CI runs since the compactiondaemon was enabled by default.
Now, I realize that this PR is at odds with making sure that all of the
usual things we do in CouchDB work correctly while the compaction daemon
is running in the background, so if you feel strongly about this, don't
hesitate to -1 it.
Noting here that the alternative is that we can try and fix all of the
suddenly failing tests - but with all of the DBs that EUnit creates and
deletes rapidly, the daemon will be working overtime to try and compact
them all. And many EUnit tests don't delete their databases after
they're done (which itself is probably another bug). The LRU is
adversely affected as well, as we see in
couchdb_views_tests:couchdb_1283
, butcouch_db_tests:should_create_multiple_dbs
would also be affected.Other test failures from enabling the compaction daemon:
Closes #652