couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [13/49] chttpd commit: updated refs/heads/windsor-merge to 554ef74
Date Fri, 01 Aug 2014 09:05:49 GMT
Add _reload_query_servers, report stale proc count

BugzID: 19529


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/12ea8a31
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/12ea8a31
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/12ea8a31

Branch: refs/heads/windsor-merge
Commit: 12ea8a313352567917bfbc2a1209904c1b9a88e2
Parents: 204ab91
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Thu Jun 6 12:13:00 2013 -0400
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Jul 29 18:01:43 2014 +0100

----------------------------------------------------------------------
 src/chttpd.erl      |  1 +
 src/chttpd_misc.erl | 31 ++++++++++++++++++++++++-------
 2 files changed, 25 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/12ea8a31/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index 6878fa5..632eb3d 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -360,6 +360,7 @@ url_handler("_utils") ->        fun chttpd_misc:handle_utils_dir_req/1;
 url_handler("_all_dbs") ->      fun chttpd_misc:handle_all_dbs_req/1;
 url_handler("_active_tasks") -> fun chttpd_misc:handle_task_status_req/1;
 url_handler("_config") ->       fun chttpd_misc:handle_config_req/1;
+url_handler("_reload_query_servers") -> fun chttpd_misc:handle_reload_query_servers_req/1;
 url_handler("_replicate") ->    fun chttpd_misc:handle_replicate_req/1;
 url_handler("_uuids") ->        fun chttpd_misc:handle_uuids_req/1;
 url_handler("_sleep") ->        fun chttpd_misc:handle_sleep_req/1;

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/12ea8a31/src/chttpd_misc.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_misc.erl b/src/chttpd_misc.erl
index 0a4badf..570df30 100644
--- a/src/chttpd_misc.erl
+++ b/src/chttpd_misc.erl
@@ -12,13 +12,24 @@
 
 -module(chttpd_misc).
 
--export([handle_welcome_req/2,handle_favicon_req/2,handle_utils_dir_req/2,
-    handle_all_dbs_req/1,handle_replicate_req/1,handle_restart_req/1,
-    handle_uuids_req/1,handle_config_req/1,
-    handle_task_status_req/1,handle_sleep_req/1,handle_welcome_req/1,
-    handle_utils_dir_req/1, handle_favicon_req/1, handle_system_req/1,
-    handle_up_req/1]).
-
+-export([
+    handle_all_dbs_req/1,
+    handle_config_req/1,
+    handle_favicon_req/1,
+    handle_favicon_req/2,
+    handle_replicate_req/1,
+    handle_reload_query_servers_req/1,
+    handle_restart_req/1,
+    handle_sleep_req/1,
+    handle_system_req/1,
+    handle_task_status_req/1,
+    handle_up_req/1,
+    handle_utils_dir_req/1,
+    handle_utils_dir_req/2,
+    handle_uuids_req/1,
+    handle_welcome_req/1,
+    handle_welcome_req/2
+]).
 
 -include_lib("couch/include/couch_db.hrl").
 -include_lib("couch_mrview/include/couch_mrview.hrl").
@@ -184,6 +195,11 @@ handle_restart_req(#httpd{method='POST'}=Req) ->
 handle_restart_req(Req) ->
     send_method_not_allowed(Req, "POST").
 
+handle_reload_query_servers_req(#httpd{method='POST'}=Req) ->
+    ok = couch_proc_manager:reload(),
+    send_json(Req, 200, {[{ok, true}]});
+handle_reload_query_servers_req(Req) ->
+    send_method_not_allowed(Req, "POST").
 
 handle_uuids_req(Req) ->
     couch_httpd_misc_handlers:handle_uuids_req(Req).
@@ -262,6 +278,7 @@ handle_system_req(Req) ->
         {io_input, Input},
         {io_output, Output},
         {os_proc_count, couch_proc_manager:get_proc_count()},
+        {stale_proc_count, couch_proc_manager:get_stale_proc_count()},
         {process_count, erlang:system_info(process_count)},
         {process_limit, erlang:system_info(process_limit)},
         {message_queues, message_queues(registered())},


Mime
View raw message