You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/07/07 07:57:42 UTC

[GitHub] wohali opened a new issue #652: Compaction daemon is interfering with eunit tests (all_dbs_active errors)

wohali opened a new issue #652: Compaction daemon is interfering with eunit tests (all_dbs_active errors)
URL: https://github.com/apache/couchdb/issues/652
 
 
   The recent enabling of the compaction daemon also has it now running during the eunit tests, which is why we're suddenly getting these `all_dbs_active` errors (for which I haven't filed a ticket yet - this is it.)
   
   If you had a `tmp/` directory inside of your couchdb checkout, you wouldn't notice this until you cleaned it out. Try removing your `tmp/` directory and you'll see the problems.
   
   Grep your `*/.eunit/couch.log` files for "Compaction" and you'll see it compacting `_nodes`, `_dbs`, etc......and with each eunit test not deleting its dbs (in many cases) we end up with it cycling over a lot of dbs over time, which ends up filling the LRU and sometimes exhausting fds. Tests closer to the end of the eunit test suite fail more often with `all_dbs_active`, especially `couchdb_views_tests:couchdb_1283`.
   
   I tried to set `[compactions] _default = []` (or the null string) in `rel/files/eunit.ini` but it doesn't work. And [the trick I used](https://github.com/apache/couchdb/pull/651/files#diff-d86563699bde00df2cce2613ecbed531R193) to stabilise the JS tests in my PR doesn't work, because some eunit tests actually need the compaction daemon, and that change completely removes its definition. Grumble.
   
   ## Expected Behavior
   Compaction daemon should be disabled completely during eunit test runs.
   
   ## Current Behavior
   Compaction daemon is running during eunit test runs, holding databases open, filling the LRU and wreaking havoc in general.
   
   ## Possible Solution
   We could set the `[compactions] _default` to something like:
   
   ```
   [compactions]
   _default = [{db_fragmentation, "99%"}, {view_fragmentation, "99%"}, {from, "00:00"}, {to, "00:01"}, {strict_window, true}]
   ```
   
   but there's still a window during which it could be interfering with databases, and during which it's going to scan through every single database it can get its hands on, which messes up the LRU. I don't know if specifying the same `from` and `to` time would work.
   
   ## Steps to Reproduce (for bugs)
   `make eunit` and grep your ~/.eunit/couch.log files for the string `"Compaction"`.
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services