MB-20822: Print correct value for vb_%d:num_erroneous_entries_erased 32/69132/3
authorDave Rigby <daver@couchbase.com>
Mon, 24 Oct 2016 09:21:30 +0000 (10:21 +0100)
committerDave Rigby <daver@couchbase.com>
Tue, 1 Nov 2016 15:30:33 +0000 (15:30 +0000)
'num_erroneous_entries_erased' was incorrectly printing the total size
of the failover table, and not the number of elements which have been
removed.

Change-Id: I7bbd75ca4db962cba257a1883ce3635b475287c7
Reviewed-on: http://review.couchbase.org/69132
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: buildbot <build@couchbase.com>
src/failover-table.cc

index 086dfe8..8f0d09a 100644 (file)
@@ -237,7 +237,8 @@ void FailoverTable::addStats(const void* cookie, uint16_t vbid,
         add_casted_stat(statname, table.size(), add_stat, cookie);
         checked_snprintf(statname, sizeof(statname),
                          "vb_%d:num_erroneous_entries_erased", vbid);
-        add_casted_stat(statname, table.size(), add_stat, cookie);
+        add_casted_stat(statname, getNumErroneousEntriesErased(), add_stat,
+                        cookie);
 
         table_t::iterator it;
         int entrycounter = 0;