You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2009/06/30 17:56:28 UTC

svn commit: r789808 - in /couchdb/branches/0.9.x: share/www/script/test/stats.js src/couchdb/couch_server_sup.erl

Author: kocolosk
Date: Tue Jun 30 15:56:27 2009
New Revision: 789808

URL: http://svn.apache.org/viewvc?rev=789808&view=rev
Log:
reset stats on POST /_restart and correct open_databases test.  Closes COUCHDB-398

Modified:
    couchdb/branches/0.9.x/share/www/script/test/stats.js
    couchdb/branches/0.9.x/src/couchdb/couch_server_sup.erl

Modified: couchdb/branches/0.9.x/share/www/script/test/stats.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/share/www/script/test/stats.js?rev=789808&r1=789807&r2=789808&view=diff
==============================================================================
--- couchdb/branches/0.9.x/share/www/script/test/stats.js (original)
+++ couchdb/branches/0.9.x/share/www/script/test/stats.js Tue Jun 30 15:56:27 2009
@@ -63,7 +63,7 @@
             db.createDb();
           }
 
-          var open_databases = requestStatsTest("couchdb", "open_databases").max;
+          var open_databases = requestStatsTest("couchdb", "open_databases").current;
           T(open_databases > 0 && max >= open_databases, name);
 
           for(var i=0; i<max+1; i++) {

Modified: couchdb/branches/0.9.x/src/couchdb/couch_server_sup.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/src/couchdb/couch_server_sup.erl?rev=789808&r1=789807&r2=789808&view=diff
==============================================================================
--- couchdb/branches/0.9.x/src/couchdb/couch_server_sup.erl (original)
+++ couchdb/branches/0.9.x/src/couchdb/couch_server_sup.erl Tue Jun 30 15:56:27 2009
@@ -32,8 +32,12 @@
     end.
 
 restart_core_server() ->
+    supervisor:terminate_child(couch_secondary_services, stats_aggregator),
+    supervisor:terminate_child(couch_secondary_services, stats_collector),
     supervisor:terminate_child(couch_primary_services, couch_server),
-    supervisor:restart_child(couch_primary_services, couch_server).
+    supervisor:restart_child(couch_primary_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