MB-8115: Don't count mem_size_counted in max_counted hash stat

Change-Id: I689eb1a83465424a850a68d8a7f5d1d57a3556f9
Reviewed-on: http://review.couchbase.org/25825
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8125: Make sure we have numeric value when setting dynamic params

Change-Id: I9666b58215b83f3eacc38e598b6ecff5eb1bc6af
Reviewed-on: http://review.couchbase.org/25807
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8038 Release hash table partition lock before notifyIOComplete

There can be a deadlock case where a memcached worker thread
tries to grab a hash table partition lock, while the dispatcher
thread already grabs the same parition lock and tries to notify
the IO complete event to the above worker thread.

Change-Id: I550f02f315d0741f300fdb09fe903fcabb1ef4b8
Reviewed-on: http://review.couchbase.org/25834
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-8143: Add missing module sys

Change-Id: I0e6697e8d677e3641d10a4bc0f233be55246338e
Reviewed-on: http://review.couchbase.org/25859
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
MB-7938: Don't decr diskQueueSize if an item is being requeued

Change-Id: Iec7270e577ed8faae18078c5eed6dfbf89e795ac
Reviewed-on: http://review.couchbase.org/25880
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-7435: Add tap-vbtakeover to cbstats

Change-Id: I77b03dee6ba4c76b713f1b68d61e9e079b1849e8
Reviewed-on: http://review.couchbase.org/25884
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-7435: Fix bug related to tap cursor deregistration during backfill

When we schedule backfill we deregister the tap cursor for a specific
tap stream and as a result any backfilled tap stream would have an
incorrect estimate since we search for tap streams based on tap
cursors.

Change-Id: I16a4f8b8e9bc8eb05de0f3fe76c7babd8e0810df
Reviewed-on: http://review.couchbase.org/25885
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-7435: Add more stats into tap-vbtakeover command

These stats provide more details on what the current state of the
tap stream is and will help in debugging.

Change-Id: Id15a8b13f930475ed3fc509709a3178e9b15ac20
Reviewed-on: http://review.couchbase.org/25886
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-7435: Account for chk start in numOpenChkItems

Change-Id: If0e2394e5a5ead6ab165b6f45fdc59f388c0e08d
Reviewed-on: http://review.couchbase.org/25921
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Jin Lim <jin@couchbase.com>
MB-7435: Make sure chk_items always gets a value

Change-Id: I2fae9d8133e9fe794170b786b5629d061ade7456
Reviewed-on: http://review.couchbase.org/25922
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Jin Lim <jin@couchbase.com>
MB-8161: Traverse the whole future queue when a task is woken

If a task is woken up then the future queue might not be in order
so we need to check each job in the future queue to make sure we
find all of the jobs that are ready to run.

Change-Id: I8505ba86180672dbb5092407debbbf777288155e
Reviewed-on: http://review.couchbase.org/25925
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
Fix 100% CPU Issue

Change-Id: I26a35e76074644b63117d348c05123c09691cc44