MB-5691: Add avg persist time to observe response

The average persist time is the lowest bits of the cas
field. When we get around to implementing the avgerage
replication time we will or those bits into the upper
32 bits of the field.

Change-Id: I102679ef7681f0a116f20a936637b578d8551f9c
Reviewed-on: http://review.couchbase.org/18019
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
CBD-393: Rename analyze_core

Change-Id: I5ed49c1d7b7c41466c8aa5debae1496d8400d1f1
Reviewed-on: http://review.couchbase.org/17926
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
CBD-393: rename cbconfig to cbepctl

Change-Id: I3c393422a3f7ca6a2f9f5ad2336bc1c5e279f5ae
Reviewed-on: http://review.couchbase.org/17954
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
MB-5495: Increment ep_commit_failed on commit failures

Change-Id: I7d71179fd1afb3a3fae2b6f89712351d5d255ca3
Reviewed-on: http://review.couchbase.org/18064
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
CBD-420 Transfering items nru reference to replicas working set

It supports transfering items nru reference to replica nodes for
working set maintenance. Add TapEngineSpecific for packing tap
producer engine specific items data incl. nru reference bit.

Change-Id: I2424bae0656a54d097ee839a00338b821b2a7418
Reviewed-on: http://review.couchbase.org/17898
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
CBD-418 add ep_engine stat to account temp items

EP Engine curr_items is sum of temp_items + live_items.

Change-Id: I14a00c108473e8b2084f45408e1d823337a94610
Reviewed-on: http://review.couchbase.org/18047
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-4297 make expiration stats vbucket state specific

Split expiration stat, expired, into active/pending/replica and
pager vs application access

Change-Id: Ibc42262384667d8d8ee15c911562ba990a41c342
Reviewed-on: http://review.couchbase.org/18049
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100: Added unit test for observe to check response length

I wrote this in response to a bug Ronnie filed on observe. Turns
out the error was in his code, but we should add this test since
I wrote it.

Change-Id: I332a462d01be834559ab600d9e0c745261784fc9
Reviewed-on: http://review.couchbase.org/18104
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5857 Correct tap specific data read pointer

Change-Id: I2cb1dcdfb762cd1df30de06f2e0aebfb83d35753
Reviewed-on: http://review.couchbase.org/18152
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5164 Optimize background fetch by batching multiple gets

As background fetches get backed-up, there is an opportunity to
batch the reads from a single vbucket into one bulk read request.
This patch includes restructuring of the background fetch into a
batch of multiple gets. It also ensure that reads are scheduled
fairly by a new task, bgfetcher, for the read-only dispatcher.

Change-Id: I4e7a5f6122bfa7303a45c971508fae3266bc6067
Reviewed-on: http://review.couchbase.org/17593
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Jin Lim <jin@couchbase.com>
MB-100: Add cbepctl to .gitignore

Change-Id: Ic778531beca640192e01b8c7c013f446049f4579
Reviewed-on: http://review.couchbase.org/18182
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-5856: Comment out unnecessary assert

On 32bit windows, the assert will get triggered and lead to memcached
exiting.

Change-Id: Ic7186e5c46f1e59d0cb8894505d22e0ed28e3db6
Reviewed-on: http://review.couchbase.org/18165
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100 Remove the sharded disk write queues.

The sharded disk write queues are intended for sqlite backend.
However, it turns out that having the intermediate sharded disk
write queues doesn't show better write througput with sqlite,
but instead caused more memory copy overhead.

Change-Id: Iad6c08fd04e74e57d7e9363c4fcaafeeb8f59952
Reviewed-on: http://review.couchbase.org/18129
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100 Minor code cleanup in Checkpoint merge function.

Change-Id: I5095860e343ab4a520b4f049ff171637d65c7bcf
Reviewed-on: http://review.couchbase.org/18221
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100 Pass RCPtr instance by reference if possible.

There were a couple of places where we didn't pass RCPtr instance
by reference.

Change-Id: I8f6030e7b1d0100118ab193c8758c0ff32f2431d
Reviewed-on: http://review.couchbase.org/18222
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5811: cbstats prints error is too many args given

Change-Id: Ia5e3027ddede67a4ec5aa6eb9675df6253e6fa8d
Reviewed-on: http://review.couchbase.org/18231
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-5811: Fixed off by one error in cbstats args parsing

Change-Id: Idddcb05abdf2100cdb7027928817e894fd3de4ff
Reviewed-on: http://review.couchbase.org/18253
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-5871 Fix wrong access scanner sleep time value change listenner

Whenever alog_sleep_time is changed, another instance of listener
would be created as part of new access scanner. This would linger
around while its access scanner had been released. Change to use
EPStoreValueChangeListener and create it only once.

Change-Id: Ifdfa23d4acf2b7eab1ff60baeeaa3e16c968c4fb
Reviewed-on: http://review.couchbase.org/18259
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Liang Guo <liang@couchbase.com>
MB-5870 fix curr_temp_items underflow

The curr_temp_items per hashtable must also account those
newly coverted temp items during softDelete. Otherwise, the
count can underflow.

Change-Id: I90ac6ad90697edf49f2ba9dbea549630948f15b4
Reviewed-on: http://review.couchbase.org/18252
Tested-by: Ketaki Gangal <ketakigangal@gmail.com>
Reviewed-by: Ketaki Gangal <ketakigangal@gmail.com>
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5878: Skip start transaction failure handling (sqlite) test

This test case only runs against sqlite and fails sporadically
on ubuntu. Since we arent supporting sqlite anymore lets just
skip this test.

Change-Id: I96e0a4d1352d684afb79ee3473a490e5ae55f548
Reviewed-on: http://review.couchbase.org/18278
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>