MB-9098: Acquire lock to retrieve list size

- Need for synchronizing access to shared data
to avoid segmentation faults and possible
memory corruption.

Change-Id: If02dcf0d61a397960f0e7bd0b738fe1bb5f93cbb
Reviewed-on: http://review.couchbase.org/29477
Reviewed-by: abhinav dangeti <abhinav.dangeti@gmail.com>
Tested-by: abhinav dangeti <abhinav.dangeti@gmail.com>
MB-9306 Fix v->isDirty assertion due to race

BGFetcher must Validate CAS values before queuing dirty
item to disk when exptime is updated

Relax assertion since downside is just another set operation

Change-Id: Icfcce79371bb867052f12c8a8574c8a318d71ace
Reviewed-on: http://review.couchbase.org/29461
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-8606: Unit test fix with multi threaded warmup

Change-Id: I6e86ae1cc8dbee62a9045c937dea931f1f7d89d4
Reviewed-on: http://review.couchbase.org/29556
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
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
Reviewed-on: http://review.couchbase.org/29664
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8893: Add UPR entry points

Change-Id: Ib9edfc7cd61d666479f4c488c961c1e57138fc70
Reviewed-on: http://review.couchbase.org/29612
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-9156: Refactor tap code and add upr producer/consumer

Refactoring of ep-engine to support both TAP and UPR.
UPR consumer "mutation" and "deletion" and producer "step" support.
This is the first checkin and more will follow.

Change-Id: Iaf5c566243d6ac6600f6df5a4384c06ccacf0588
Reviewed-on: http://review.couchbase.org/29598
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-9098: Acquire lock to retrieve list size

- Need for synchronizing access to shared data
to avoid segmentation faults and possible
memory corruption.

- Backporting from master:
    http://review.couchbase.org/#/c/29477/

Change-Id: Id24770dbc72c082967959aee30c8e21b9556989e
Reviewed-on: http://review.couchbase.org/29687
Reviewed-by: Sundararaman Sridharan <sundar.sridharan@gmail.com>
Tested-by: Sundararaman Sridharan <sundar.sridharan@gmail.com>
MB-9306 Fix v->isDirty assertion due to race

BGFetcher must Validate CAS values before queuing dirty
item to disk when exptime is updated

Relax assertion since downside is just another set operation

Backport from 
http://review.couchbase.org/#/c/29461/

Change-Id: Icfcce79371bb867052f12c8a8574c8a318d71ace
Reviewed-on: http://review.couchbase.org/29461
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Reviewed-on: http://review.couchbase.org/29699
Reviewed-by: abhinav dangeti <abhinav.dangeti@gmail.com>
Tested-by: abhinav dangeti <abhinav.dangeti@gmail.com>
Modifications to upr api based on memcached changes

Change-Id: I8c2430a843bfee4fef716747bc9e976ad34469db
Reviewed-on: http://review.couchbase.org/29700
Reviewed-by: David Liao <david.liao@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Allow compilation with clang++

Change-Id: Ie622380456cfcb51615bdb5eea1be04b12383d3a
Reviewed-on: http://review.couchbase.org/29723
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
for MB-7230: state why access log was seen corrupt

Basic debugging whenever we hit a read error on
scanning the access log

Change-Id: I4b02a9484e7d0b56c0691e062717729d9d7ed4d5
Reviewed-on: http://review.couchbase.org/29768
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>