MB-9179 Shard count made configurable

This change makes the number of shards configurable when a bucket
is instantiated and sets its default number to four. As part of
the global IO manager optimization, the workload policy (i.e.,
read-heavy, write-heavy, and mixed) parameter, which is used in
determining the number of shards, is no longer necessary.

As part of further enhancements, we plan to investigate
differentiating the number of shards depending on a bucket
priority.

Change-Id: I88f1dd0b681aaa562415c2748f8a0d9d9b1a26e3
Reviewed-on: http://review.couchbase.org/29234
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100: Fix the engine name in the readme since we've evolved.

Change-Id: Icdd348f34a85bafaa24c24f18c9370dff3e93fc7
Reviewed-on: http://review.couchbase.org/29305
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100: Add a note about versioning, tags to deconfuse the situation.

Change-Id: If585bccfe24aa09f4de1779f32185819171b6900
Reviewed-on: http://review.couchbase.org/29306
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
mb-9202: Fix bucket deletion hang

Cancel Access scanner task on shutdown
scheduler must cancel tasks if it is dead regardless of return type
order the #include in alphabetical order to fix make test failure
Change-Id: Id995e15cca925a78d9588167c59201ff92e2af96
Reviewed-on: http://review.couchbase.org/29343
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Cast mc_ssize_t to ssize_t

Change-Id: Ie8fa31ef74eebe558aaa9f5c6488ef5aa7af552e
Reviewed-on: http://review.couchbase.org/29351
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-9237: Fix bucket creation hang with 3 replicas

With new shard based thread change, it can happen that the
total number of threads does not match the total number of
workers set on each bucket.

Hence fix startWorkers() to exit immediately if we have
hit the max limit on the number of IO worker threads

Change-Id: I9884d3edb1ef3e38360ce961f7799594ecaacc7a
Reviewed-on: http://review.couchbase.org/29396
Reviewed-by: abhinav dangeti <abhinav.dangeti@gmail.com>
Tested-by: abhinav dangeti <abhinav.dangeti@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-8606: Parallelizing warmup as a READER task

Improve the efficiency of warmup, by having multiple
threads catering to it, rather than a single thread.

Taking into considering GIO, the warmup task will now
be made a READER_QUEUE task rather than an AUX_QUEUE
task.

The advantage will be with spliting up the keyDump,
LoadingKVPairs and LoadingData state_tasks during
the warmup process into shard level tasks, and have
multiple reader threads cater to each of the sub-
scheduled tasks.

This shouldnt affect any other READER_QUEUE pertinent
task, as traffic is disabled during warmup anyway.

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