couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [13/50] couch commit: updated refs/heads/import to 09c6556
Date Mon, 10 Feb 2014 20:22:35 GMT
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/heads/import
Commit: 54a7b406eba0e9b486dcc147561d0dc2858f6d34
Parents: 14d1dd2
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Thu Feb 21 00:14:43 2013 -0600
Committer: Paul J. Davis <paul.joseph.davis@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}


Mime
View raw message