[
https://issues.apache.org/jira/browse/COUCHDB-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725309#action_12725309
]
Adam Kocoloski commented on COUCHDB-397:
----------------------------------------
Ok, let's review:
supervisor:terminate_child(couch_primary_services, couch_server)
This call tells the supervisor process registered as couch_primary_services to
terminate its child process with id couch_server. The child specification for
couch_server specifies a brutal_kill shutdown strategy. This means that the
couch_server process will not execute the code in its terminate function; it
will just die.
If couch_stats_* were linked to couch_server and were not trapping exits, this
would probably be enough to reset the counters. But that's not the case.
A sneaky hack that you could use to bring down the entire server would be
exit(whereis(couch_config), any_reason_you_feel_like).
couch_server_sup has three children: couch_config, couch_primary_services, and
couch_secondary_services. If you kill one, the supervisor will bring them all
down and restart them (this is the one_for_all supervision strategy).
couch_config doesn't trap exits, so it's an easy kill :-)
> POST _restart only restarts couch_server process
> ------------------------------------------------
>
> Key: COUCHDB-397
> URL: https://issues.apache.org/jira/browse/COUCHDB-397
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 0.9
> Reporter: Adam Kocoloski
> Assignee: Adam Kocoloski
>
> Perhaps this is by design, but POSTing to /_restart only restarts the
> couch_server process. It does not restart any of the other myriad processes
> CouchDB relies on for operation. In particular, this causes the stats test
> suite to occasionally fail, because the stats counters do not get reset. The
> test that fails is
> Assertion 'open_databases > 0 && max >= open_databases, name' failed: should
> keep the same number of open databases when reaching the max_dbs_open limit
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.