summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_server_sup.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-06-30 17:02:24 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-06-30 17:02:24 +0000
commit111da624f716217fc9180a75f388a025f3c27d1f (patch)
tree23c20fb1fed5d3cb9dfea998bd3e559b5b4ebeb0 /src/couchdb/couch_server_sup.erl
parent57326fb4942281109d21fef403f51867c8f984f7 (diff)
reset stats on POST /_restart and correct open_databases test. Closes COUCHDB-398
I rearranged the shutdown order from what was committed in the 0.9.x branch so that the stats collector is still up when couch_server shuts down. This way the messages to decrement the number of open_databases during the shutdown don't fail with a badarg. The badarg is silently ignored in 0.9.x, but here we pattern match with a true so we end up with lots of error reports. You may see some spurious erlang error reports when running the test suite on an SMP emulator, due to the use of public ets tables in the stats collector API. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@789829 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_server_sup.erl')
-rw-r--r--src/couchdb/couch_server_sup.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/couchdb/couch_server_sup.erl b/src/couchdb/couch_server_sup.erl
index e59286f3..4c77dbe1 100644
--- a/src/couchdb/couch_server_sup.erl
+++ b/src/couchdb/couch_server_sup.erl
@@ -32,10 +32,12 @@ start_link(IniFiles) ->
end.
restart_core_server() ->
- supervisor:terminate_child(couch_secondary_services, couch_server),
supervisor:terminate_child(couch_primary_services, couch_server),
+ supervisor:terminate_child(couch_secondary_services, stats_aggregator),
+ supervisor:terminate_child(couch_secondary_services, stats_collector),
supervisor:restart_child(couch_primary_services, couch_server),
- supervisor:restart_child(couch_secondary_services, couch_server).
+ supervisor:restart_child(couch_secondary_services, stats_collector),
+ supervisor:restart_child(couch_secondary_services, stats_aggregator).
couch_config_start_link_wrapper(IniFiles, FirstConfigPid) ->
case is_process_alive(FirstConfigPid) of