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/31c792ee Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/31c792ee Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/31c792ee Branch: refs/heads/import Commit: 31c792ee25a9d3eeea8d91b98324c552fbba513b Parents: c13d58a Author: Paul J. Davis <[email protected]> Authored: Thu Feb 21 00:14:43 2013 -0600 Committer: Paul J. Davis <[email protected]> Committed: Fri Jan 17 16:44:31 2014 -0800 ---------------------------------------------------------------------- src/couch_server.erl | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/31c792ee/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}
