MB-9322 Fix the high idle cpu usage in GIO manager

The existing sleep time of flusher of 0.1s turned out to be too
low and resulted in a lot of wasted cycles during idle time
Set all min sleep and wake times to 2.0 seconds

Also use SingleThreadedRCPtr instead of RCPtr in GIO manager to avoid
the overhead of spin locks

Fix verified using oprofile and top

Change-Id: Ia013b93a57225b42c48df47e3b465b1067478cf4
Reviewed-on: http://review.couchbase.org/29593
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Memcached is moved in the source layout

Change-Id: Iaf71a784c957cce66245c6873b72ca8f7cc95b7f
Reviewed-on: http://review.couchbase.org/29576
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Move genconfig/gencode to ../cmake/memcached

be moved back when ep-engine is being built by CMake

Change-Id: If7aaca45ec63e0b2aa9cc332873865943758d745
Reviewed-on: http://review.couchbase.org/29577
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Use implementations from platform lib

Change-Id: Ic92b3960d73c4f6c89e43491031d386f41754b46
Reviewed-on: http://review.couchbase.org/29578
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Use common cJSON

Change-Id: Ic145eb819a3273b862f082bdcd2ea406e9909966
Reviewed-on: http://review.couchbase.org/29579
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Fix build related problems on win32

Change-Id: Id5ccc1331e9d662356e6de78b17c7fdb7983dbee
Reviewed-on: http://review.couchbase.org/29580
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Refactor the way items are retrieved from the Checkpoint Manager

Change-Id: I98d34ee9720142c7c5d8524836bbe68284330b33
Reviewed-on: http://review.couchbase.org/29570
Tested-by: buildbot <build@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Add a cursor index type

Change-Id: I15f0d62228bbcc6d399f1fbd7bd190086f344687
Reviewed-on: http://review.couchbase.org/29571
Tested-by: buildbot <build@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Only log message if we are acutally removing a tap cursor

There is a place in the code that calls this function for each
vbucket and this causes the logs to be flooded with messages
about removing tap cursors from vbuckets even when none are
removed. If we log the message after we check to see if the
cursor exists then the problem goes away.

Change-Id: Ie910422e7cca5e1da05a467f68aac78f6db12c53
Reviewed-on: http://review.couchbase.org/29572
Tested-by: buildbot <build@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Fix minor cpplint error

Change-Id: I219d60c983af643e502fe4ede58034944ae0d123
MB-8893: Add UPR entry points

Change-Id: Ib9edfc7cd61d666479f4c488c961c1e57138fc70
MB-9103: Backfills are only from disk

This removes the memory backfill that was used when more than 90%
of the items are resident in memory. We cannot use that mechanism
anymore because we need to ensure that items are sent in order of
increasing sequence number.

Change-Id: I6d1e1994ce558d3cba45693d82e7d51c280b0704
MB-9107: During Backfill don't read resident values off disk

We remove in-memroy backfilling in a previous commit and this
can cause backfilling to be slow if most of the items are in
memory. This change allows us to skip reading values off of disk
if the values already exist in memory.

Change-Id: I51aad158e9bab15cc8fb78f3c140c1d87c224101