You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2014/02/10 21:05:13 UTC

[13/50] couch commit: updated refs/remotes/origin/import to 09c6556

Middle ground on logging db openers

Rather than get too complicated with timers for each db open we'll just
silence if there's less than some smallish number of clients. And if
that threshold is exceeded we'll also log the total number of clients.


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

Branch: refs/remotes/origin/import
Commit: 54a7b406eba0e9b486dcc147561d0dc2858f6d34
Parents: 14d1dd2
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Feb 21 00:14:43 2013 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Feb 4 17:03:24 2014 -0600

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/54a7b406/src/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_server.erl b/src/couch_server.erl
index e8d8c49..40c2d7e 100644
--- a/src/couch_server.erl
+++ b/src/couch_server.erl
@@ -349,6 +349,10 @@ handle_call({open, DbName, Options}, From, Server) ->
     [#db{compactor_pid = Froms} = Db] when is_list(Froms) ->
         % icky hack of field values - compactor_pid used to store clients
         true = ets:insert(couch_dbs, Db#db{compactor_pid = [From|Froms]}),
+        if length(Froms) =< 10 -> ok; true ->
+            Fmt = "~b clients waiting to open db ~s",
+            ?LOG_INFO(Fmt, [length(Froms), DbName])
+        end,
         {noreply, Server};
     [#db{} = Db] ->
         {reply, {ok, Db}, Server}