MB-20307: Re-enable dcp ep_dcp_dead_conn_count 84/66284/4 sherlock v4.1.2 v4.1.2-MP1 v4.1.2-MP2
authorJim Walker <jim@couchbase.com>
Thu, 28 Jul 2016 10:38:45 +0000 (11:38 +0100)
committerJim Walker <jim@couchbase.com>
Thu, 28 Jul 2016 18:26:34 +0000 (18:26 +0000)
The call to collect this stat was dropped in
a recent merge commit. This commit adds it back.

Change-Id: I06d1d18cb4479edb2a74d899d4c3a8089a0c4656
Reviewed-on: http://review.couchbase.org/66284
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>

src/connmap.cc
src/connmap.h
src/ep_engine.cc

index a06dd81..a19bad1 100644 (file)
@@ -1298,3 +1298,9 @@ void DcpConnMap::updateMaxActiveSnoozingBackfills(size_t maxDataSize)
     LOG(EXTENSION_LOG_DEBUG, "Max active snoozing backfills set to %d",
         maxActiveSnoozingBackfills);
 }
+
+void DcpConnMap::addStats(ADD_STAT add_stat, const void *c) {
+    LockHolder lh(connsLock);
+    add_casted_stat("ep_dcp_dead_conn_count", deadConnections.size(),
+                    add_stat, c);
+}
index bc72555..1962d03 100644 (file)
@@ -519,6 +519,8 @@ public:
      */
     void consumerBatchSizeConfigChanged(size_t newValue);
 
+    void addStats(ADD_STAT add_stat, const void *c);
+
 protected:
 
     bool isPassiveStreamConnected_UNLOCKED(uint16_t vbucket);
index 3b7328d..921a33b 100644 (file)
@@ -4082,6 +4082,7 @@ ENGINE_ERROR_CODE EventuallyPersistentEngine::doDcpStats(const void *cookie,
     add_casted_stat("ep_dcp_max_running_backfills",
                     dcpConnMap_->getMaxActiveSnoozingBackfills(), add_stat, cookie);
 
+    dcpConnMap_->addStats(add_stat, cookie);
     return ENGINE_SUCCESS;
 }