You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/09/02 20:34:33 UTC

[1/4] chttpd commit: updated refs/heads/master to 841ee1a

Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 33f75ea2b -> 841ee1afe


Remove `ignore_providers` option

COUCHDB-2796


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

Branch: refs/heads/master
Commit: 36455614af8ac80c2d96725e3d6c8d3366386a6e
Parents: 2fba00d
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Tue Sep 1 06:25:12 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Tue Sep 1 06:25:12 2015 -0700

----------------------------------------------------------------------
 src/chttpd_auth.erl     | 2 +-
 src/chttpd_handlers.erl | 2 +-
 src/chttpd_plugin.erl   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/36455614/src/chttpd_auth.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_auth.erl b/src/chttpd_auth.erl
index 35a4bd5..0746138 100644
--- a/src/chttpd_auth.erl
+++ b/src/chttpd_auth.erl
@@ -70,7 +70,7 @@ handle_session_req(Req) ->
 
 maybe_handle(Func, Args, Default) ->
     Handle = couch_epi:get_handle(?SERVICE_ID),
-    case couch_epi:apply(Handle, ?SERVICE_ID, Func, Args, [ignore_providers]) of
+    case couch_epi:apply(Handle, ?SERVICE_ID, Func, Args, []) of
         [] when is_function(Default) ->
             apply(Default, Args);
         [] ->

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/36455614/src/chttpd_handlers.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_handlers.erl b/src/chttpd_handlers.erl
index 85f8318..15d63d4 100644
--- a/src/chttpd_handlers.erl
+++ b/src/chttpd_handlers.erl
@@ -43,7 +43,7 @@ design_handler(HandlerKey, DefaultFun) ->
 %% ------------------------------------------------------------------
 
 collect(Func, Args) ->
-    Results = do_apply(Func, Args, [ignore_providers]),
+    Results = do_apply(Func, Args, []),
     [HandlerFun || HandlerFun <- Results, HandlerFun /= no_match].
 
 do_apply(Func, Args, Opts) ->

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/36455614/src/chttpd_plugin.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_plugin.erl b/src/chttpd_plugin.erl
index e174a68..30e1d32 100644
--- a/src/chttpd_plugin.erl
+++ b/src/chttpd_plugin.erl
@@ -41,7 +41,7 @@ handle_error(Error) ->
 %% ------------------------------------------------------------------
 
 with_pipe(Func, Args) ->
-    do_apply(Func, Args, [ignore_providers, pipe]).
+    do_apply(Func, Args, [pipe]).
 
 do_apply(Func, Args, Opts) ->
     Handle = couch_epi:get_handle(chttpd),


[4/4] chttpd commit: updated refs/heads/master to 841ee1a

Posted by rn...@apache.org.
Merge remote-tracking branch 'cloudant/2796-improve_performance_of_providers_function'


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

Branch: refs/heads/master
Commit: 841ee1afe33e6b0518a655c49905df4fd1f4e3ae
Parents: 33f75ea 3ce2a1c
Author: Robert Newson <rn...@apache.org>
Authored: Wed Sep 2 19:34:25 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Sep 2 19:34:25 2015 +0100

----------------------------------------------------------------------
 src/chttpd_auth.erl     |  2 +-
 src/chttpd_handlers.erl | 10 ++++++----
 src/chttpd_plugin.erl   |  8 +++++---
 src/chttpd_sup.erl      |  4 ++++
 4 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[3/4] chttpd commit: updated refs/heads/master to 841ee1a

Posted by rn...@apache.org.
Register service

COUCHDB-2796


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

Branch: refs/heads/master
Commit: 3ce2a1c17c01936966c5ae47d13b4d6691f8f06b
Parents: f46e9c8
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed Sep 2 09:50:41 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed Sep 2 09:50:41 2015 -0700

----------------------------------------------------------------------
 src/chttpd_sup.erl | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/3ce2a1c1/src/chttpd_sup.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_sup.erl b/src/chttpd_sup.erl
index 62d00eb..00c4588 100644
--- a/src/chttpd_sup.erl
+++ b/src/chttpd_sup.erl
@@ -23,6 +23,10 @@ start_link(Args) ->
     supervisor:start_link({local,?MODULE}, ?MODULE, Args).
 
 init([]) ->
+    couch_epi:register_service(chttpd_auth),
+    couch_epi:register_service(chttpd_handlers),
+    couch_epi:register_service(chttpd),
+
     chttpd_config_listener:subscribe(),
     {ok, {{one_for_one, 3, 10}, [
         ?CHILD(chttpd, worker),


[2/4] chttpd commit: updated refs/heads/master to 841ee1a

Posted by rn...@apache.org.
Use ?SERVICE_ID macro

COUCHDB-2796


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

Branch: refs/heads/master
Commit: f46e9c8d6893b8ad7e7a5e59c9365569ff2119b1
Parents: 3645561
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed Sep 2 09:50:08 2015 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed Sep 2 09:50:08 2015 -0700

----------------------------------------------------------------------
 src/chttpd_handlers.erl | 8 +++++---
 src/chttpd_plugin.erl   | 6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/f46e9c8d/src/chttpd_handlers.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_handlers.erl b/src/chttpd_handlers.erl
index 15d63d4..d4a5e27 100644
--- a/src/chttpd_handlers.erl
+++ b/src/chttpd_handlers.erl
@@ -19,6 +19,8 @@
     design_handler/2
 ]).
 
+-define(SERVICE_ID, chttpd_handlers).
+
 -include_lib("couch/include/couch_db.hrl").
 
 %% ------------------------------------------------------------------
@@ -27,7 +29,7 @@
 
 provider(App, Module) ->
     couch_epi_functions:childspec(chttpd_handlers_subscription,
-       App, chttpd_handlers, Module).
+       App, ?SERVICE_ID, Module).
 
 url_handler(HandlerKey, DefaultFun) ->
     select(collect(url_handler, [HandlerKey]), DefaultFun).
@@ -47,8 +49,8 @@ collect(Func, Args) ->
     [HandlerFun || HandlerFun <- Results, HandlerFun /= no_match].
 
 do_apply(Func, Args, Opts) ->
-    Handle = couch_epi:get_handle(?MODULE),
-    couch_epi:apply(Handle, chttpd, Func, Args, Opts).
+    Handle = couch_epi:get_handle(?SERVICE_ID),
+    couch_epi:apply(Handle, ?SERVICE_ID, Func, Args, Opts).
 
 select([], Default) ->
     Default;

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/f46e9c8d/src/chttpd_plugin.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_plugin.erl b/src/chttpd_plugin.erl
index 30e1d32..c17ffc8 100644
--- a/src/chttpd_plugin.erl
+++ b/src/chttpd_plugin.erl
@@ -18,6 +18,8 @@
     handle_error/1
 ]).
 
+-define(SERVICE_ID, chttpd).
+
 -include_lib("couch/include/couch_db.hrl").
 
 %% ------------------------------------------------------------------
@@ -44,5 +46,5 @@ with_pipe(Func, Args) ->
     do_apply(Func, Args, [pipe]).
 
 do_apply(Func, Args, Opts) ->
-    Handle = couch_epi:get_handle(chttpd),
-    couch_epi:apply(Handle, chttpd, Func, Args, Opts).
+    Handle = couch_epi:get_handle(?SERVICE_ID),
+    couch_epi:apply(Handle, ?SERVICE_ID, Func, Args, Opts).