MB-21150: A single total for drift ahead exceptions 72/68272/11
authorJim Walker <jim@couchbase.com>
Mon, 3 Oct 2016 13:33:25 +0000 (14:33 +0100)
committerDave Rigby <daver@couchbase.com>
Wed, 12 Oct 2016 07:42:59 +0000 (07:42 +0000)
Report a stat that captures every time we've set a vbucket's HLC
from a peer who is ahead of the threshold of the node.

Change-Id: I7b7d73b5044afd2a4cfcc2d8ed43e9018b478f19
Reviewed-on: http://review.couchbase.org/68272
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/ep_engine.cc
tests/ep_testsuite.cc

index fbb784f..3bc4801 100644 (file)
@@ -3697,6 +3697,12 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::doEngineStats(const void *cookie,
         replicaCountVisitor.getTotalHLCDriftExceptionCounters().behind,
         add_stat, cookie);
 
+    // A single total for ahead exceptions accross all active/replicas
+    add_casted_stat("ep_clock_cas_drift_threshold_exceeded",
+        activeCountVisitor.getTotalHLCDriftExceptionCounters().ahead +
+        replicaCountVisitor.getTotalHLCDriftExceptionCounters().ahead,
+        add_stat, cookie);
+
     return ENGINE_SUCCESS;
 }
 
index 1fe0491..db60da5 100644 (file)
@@ -6308,6 +6308,7 @@ static enum test_result test_mb19687_fixed(ENGINE_HANDLE* h,
                 "ep_chk_persistence_remains",
                 "ep_chk_persistence_timeout",
                 "ep_chk_remover_stime",
+                "ep_clock_cas_drift_threshold_exceeded",
                 "ep_commit_num",
                 "ep_commit_time",
                 "ep_commit_time_total",