MB-7133: change default batch size and log improvement

Today during XDCR, the batch is limited by both the number of docs
and size of batch packet. The former is set to 500 docs. But the
latter is only 512K, which may nullify the number of docs limit
if the averge doc size is more than 1KB. By Fashid, it is reasonable
to assume 4KB doc in the workload, accordingly the size limit is set
to 2048KB.

Additionally, in this change-set we 1) make the concurrent reps per
bucket a ns_server configurable parameter, consitent with other XDCR
parameters. Note the env parameter name is not changed; 2) dump the
default value of all XDCR parameters when the replication manager
starts, for easy debug and performance diag.

Change-Id: If2cd6db1ce660afdb54179790072ba97e5005661
Reviewed-on: http://review.couchbase.org/22551
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
MB-7198: fix XDCR checkpoint timer issue

Today we start timer each time the vb replication starts or wakes up
from sleeping. However, we do not cancel the old timer when creating
a new one. This caused accumulated timer over time per vb replicator
and thus flood the vb replicator with more checkpoint msgs than
expected.

This fix cancels the timer when vb replicator is done or terminates,
and it also cancels old timer if exists, before creating a new one.

Change-Id: Ied66c5c4b4449afdefc55fb9e235d51659fd951e
Reviewed-on: http://review.couchbase.org/22581
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
Tested-by: Ketaki Gangal <ketakigangal@gmail.com>
MB-7220: Retrieve datbase_dir from ini file

db_dir is no longer persisted in config.dat file since 2.0

Change-Id: I8a88f7826572b0010d7fc1db2183c0894c5ff0b8
Reviewed-on: http://review.couchbase.org/22660
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
MB-7200: Capture ddocs/views from all buckets

Change-Id: I0397227a57096e0f371bef26c20947e6473a64fb
Reviewed-on: http://review.couchbase.org/22661
Tested-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
MB-7197: decrease number of scheduler threads to 16

Because more schedulers does not help, but make idle system overhead
too big.

Change-Id: Ic476ee4897afa0fa03f1d0421171463e45fe4273
Reviewed-on: http://review.couchbase.org/22690
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
Tested-by: Farshid Ghods <farshid@couchbase.com>
MB-7219: Expose XDCR tuning parameters as interal settings

Currently, the XDCR tuning settings (concurrent replications,
checkpoint interval, worker batch size and count, failure
restart interval) are not accessible via REST API. This
commit adds them into the /internalSettings REST call and
for consistency, adds them to the interal settings UI.

Change-Id: If39a1f0da30a2089b2cec54c07206d6063a06fc2
Reviewed-on: http://review.couchbase.org/22684
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Revert "MB-7124: Don't capitalize doc id in view sample document window"

This reverts commit 6bc64a6643619ab43672f7314519a1ea99e996dc.

Change-Id: I6b0edf970b9f3ea1d09b9f3c85f531d7a80b8f30
Reviewed-on: http://review.couchbase.org/22693
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
MB-7223: MB-7124: correctly fix sample document id capitalization

Some time ago unfortunately some css classes were reused in some new
parts of 2.0 essentially encouranging regression seen in
MB-7223.

Basically if in one place you want capitalization and another you
dont, you can 'fix' capitalization by changing CSS rule in one place
simultaneously braking it in other. That's because CSS classes are not
semantical and have unpredictable effects on unpredictable places.

So right fix of MB-7124 is to do it in a way that we started doing
once we realized scope of CSS mess we're in. We're mostly using inline
styles now.

Change-Id: I267a7698a499e35b96dd49e3672f4cbf60d9d66e
Reviewed-on: http://review.couchbase.org/22694
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>