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/22 11:30:30 UTC

fabric commit: updated refs/heads/master to cad0918

Repository: couchdb-fabric
Updated Branches:
  refs/heads/master e46ab8fb7 -> cad0918d8


Added counter metric for fabric-worker-timeout.

This is being done as a good indicator for when mspot is
having issues.  An alert threshold will be set in
centinela.

BugzID: 50369


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

Branch: refs/heads/master
Commit: cad0918d85529752ce32c18d92b5f612fe598235
Parents: e46ab8f
Author: Bryan Green <db...@us.ibm.com>
Authored: Fri Aug 7 19:06:14 2015 -0500
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Sep 22 10:29:56 2015 +0100

----------------------------------------------------------------------
 priv/stats_descriptions.cfg | 4 ++++
 src/fabric_util.erl         | 2 ++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/cad0918d/priv/stats_descriptions.cfg
----------------------------------------------------------------------
diff --git a/priv/stats_descriptions.cfg b/priv/stats_descriptions.cfg
index a65263c..0c2351b 100644
--- a/priv/stats_descriptions.cfg
+++ b/priv/stats_descriptions.cfg
@@ -1,3 +1,7 @@
+{[fabric, worker, timeouts], [
+    {type, counter},
+    {desc, <<"number of worker timeouts">>}
+]}.
 {[fabric, read_repairs, success], [
     {type, counter},
     {desc, <<"number of successful read repair operations">>}

http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/cad0918d/src/fabric_util.erl
----------------------------------------------------------------------
diff --git a/src/fabric_util.erl b/src/fabric_util.erl
index 7b2ed75..ef40484 100644
--- a/src/fabric_util.erl
+++ b/src/fabric_util.erl
@@ -152,6 +152,8 @@ timeout(Type, Default) ->
     end.
 
 log_timeout(Workers, EndPoint) ->
+    CounterKey = [fabric, worker, timeouts],
+    couch_stats:increment_counter(CounterKey),
     lists:map(fun(#shard{node=Dest, name=Name}) ->
         Fmt = "fabric_worker_timeout ~s,~p,~p",
         couch_log:error(Fmt, [EndPoint, Dest, Name])