2.1.0 branch at build 2.0.2-824

Change-Id: I3695c6d3fdc95eccd415722114e75df0b79f984a
Reviewed-on: http://review.couchbase.org/26698
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>
Merge remote-tracking branch 'origin/2.0.2' into b210

* origin/2.0.2:
  Revert "MB-8348:added internal setting for use of fadvise in db compactor"

trivial

Change-Id: Iacf9d1a17d6d69571d9141ec0bd52fc1f69a26f1
Merge remote-tracking branch 'origin/2.1.0'

* origin/2.1.0:
  2.1.0 branch at build 2.0.2-824

trivial merge

Change-Id: I333860dd8759b2fb6fef0418f9b41ff5f5df9d28
MB-8363 Set numThreads minimum value to 1.

Change-Id: Ic273744c1076501031af2ba0a9bb6d43368ff23d
Reviewed-on: http://review.couchbase.org/26737
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8404: prevent replacing 127.0.0.1 in engageCluster reply

That replacement is usually needed for single-node clusters where node
name is 127.0.0.1. And where we cannot send 127.0.0.1 because that
will cause client to try to reach memcached (or moxi) at wrong
address.

But clearly this renaming is not needed in engageCluster which is
intra-cluster API. And also this renaming was actual reason why our
normally very strict pre-join checks failed to detect badness of
trying to join 127.0.0.1.

Change-Id: I34bb56d0018ae626adb8b79f5ac603ef3c434569
Reviewed-on: http://review.couchbase.org/26738
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Merge remote-tracking branch 'couchbase/2.1.0'

* couchbase/2.1.0:
  MB-8404: prevent replacing 127.0.0.1 in engageCluster reply
  MB-8363 Set numThreads minimum value to 1.

Change-Id: I04d350f6f3834f72ecde0e37150ccb65eac97e84
MB-8415 change engine parameter num_shards to num_workers

Change-Id: I5035442233e1208e7a9a7540382a38ba4dec810a
Reviewed-on: http://review.couchbase.org/26776
Tested-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Revert "MB-8415 change engine parameter num_shards to num_workers"

This reverts commit c84d26d7e27f63f5ad6919d18d8392cd590dd983.

Change-Id: Ic17b36277106f7de77a351e0ce8d8dc45e675e02
Reviewed-on: http://review.couchbase.org/26786
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7363: don't allow stacking of same poor man's alerts

Part of poor man's alerts is alert "key" which is used to prevent
duplicate alerts from reappering too often. We can use that same key
in order for fresher alerts to overwrite older alerts for same key.

This commit also makes metadata overhead and commit failure alerts
have per-bucket keys. So that alerts related to different buckets are
treated as separate alerts.

Change-Id: Ib6146b0a53d2b96c7dd5adf0c9998f3d51855df6
Reviewed-on: http://review.couchbase.org/26802
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-8383 Count ret_meta commands as their ordinary counterparts.

And don't count them as xdcr ops.

Change-Id: Ic0eae1f5f9bdb95cfcb1ab78cb0ca22336c5ce0c
Reviewed-on: http://review.couchbase.org/26806
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/2.1.0'

* origin/2.1.0:
  MB-8383 Count ret_meta commands as their ordinary counterparts.
  MB-7363: don't allow stacking of same poor man's alerts
  Revert "MB-8415 change engine parameter num_shards to num_workers"
  MB-8415 change engine parameter num_shards to num_workers

Change-Id: Ifeba39178cac8a9064444d7ac368568abd76f670
MB-8429: grab memcached logs in osx too

Clearly grabbing memcached logs is not Linux-specific and thanks to
"server guts" we should have right path regardless of OS or customer
setup.

Change-Id: Ie8320b9a872c035b9b8a809b6caf86e6f02e8022
Reviewed-on: http://review.couchbase.org/26841
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Revert "Revert "MB-8415 change engine...""

This reverts commit a165d1c10cf0071571cd3787a0b7c5a5cae3f391.

This returns original commit which was just reverted in order to let
ep-engine folks review their corresponding change.

Change-Id: Ied466f51f2ee648c350e1b2b490bbe78576f624b
Reviewed-on: http://review.couchbase.org/26787
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
MB-8415 set minum num_threads back to 2 and set default to 3

Change-Id: Ib82f15f31155dd8f9e4f37073b27115f300549d2
Reviewed-on: http://review.couchbase.org/26796
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Jin Lim <jin@couchbase.com>
Merge remote-tracking branch 'origin/2.1.0'

* origin/2.1.0:
  MB-8415 set minum num_threads back to 2 and set default to 3
  Revert "Revert "MB-8415 change engine...""
  MB-8429: grab memcached logs in osx too

trivial merge

Change-Id: I88dfd7d599b7af47d28b708daf9dd4fae4cdabfb
MB-100 Really set default number of readers/writers to 3.

Change-Id: I64d014ead6a90a706a6ff030023115eecf7250c0
Reviewed-on: http://review.couchbase.org/26871
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'couchbase/2.1.0'

* couchbase/2.1.0:
  MB-100 Really set default number of readers/writers to 3.

Change-Id: Ia03c74d67cd8a62c940c42a6e6fc25b69d9709fa
MB-100: don't mention erlang when refusing "dotless" hostnames

We do in fact refuse because of erlang, but it was said that it's
better to just say we require fqdn, not erlang which looks like some
complain.

Change-Id: Iaf3dd4cdeda186ea874a2e79c0b6a9969ece0455
Reviewed-on: http://review.couchbase.org/26958
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-100: collect diags before logs

So that if grabbing diag fails we have some clues in logs

Change-Id: Ib01650dd7f72b5b7c7369b0ba9383fe6efa7c14a
Reviewed-on: http://review.couchbase.org/26959
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-8433: don't lose rebalance progress stats on ff map reset

In MB-8433 we observed complete reset of rebalance observer state, and
from closer code inspection we found it was caused by fast-forward map
reset that completes bucket rebalance.

Trivial fix is to only do initiate_bucket_rebalance only on first
fast-forward map update for bucket.

Change-Id: I9b19fefe7c555c6328f8ac093fb922ffeaabc50e
Reviewed-on: http://review.couchbase.org/26960
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>