Github user iilyak commented on the pull request:
https://github.com/apache/couchdb-couch/pull/126#issuecomment-154569604
@jaydoane: The cyclic dependency could be triggered with following:
1. make a syntactic error in `couch-log/priv/stats_descriptions.cfg`
2. `couch_stats_aggregator` would try to reload metrics. The reload logic
skips all metrics defined in a file we cannot read (using `file:consult`)
3. Any attempt to log anything using `couch_log:<level>` would cause
[`couch_log:notice("unknown metric: ~p",
[Name])`](https://github.com/apache/couchdb-couch-stats/blob/master/src/couch_stats.erl#L118)
4. `couch_log:notice` in it's turn calls
[`couch_stats:increment()`](https://github.com/apache/couchdb-couch-log/blob/master/src/couch_log.erl#L47)
5. we would have an infinite loop which will bring the node down.
However you a right the problem I mentioned would exhibit itself regardless
of this particular change.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---