[cbcollect_info] couch_dbdump _replicator docs

Change-Id: If65de892c0fc1702506176672bcc3c550efe48ed
MB-9612: handling remote_cluster_info error more gracefully

Today during vb replicator initialization, if remote_cluster_info
fails to grab remote bucket info for any reason, the vb
replicator will crash on a badmatch error and the throttle
will reschedule the next waiting one. This immediate-retry-
after-failure behavior may cause more repeated errors from
remote and vb replicators at source side may crash repeatedly
for nothing.

This commit will make vb replicator consume the error from
remote_cluster_info. If any error returns, the vb replicator
will pause for sometime (default is 30 seconds), and re-query
remote_cluster_info. If the TMP error at remote resolves in
30 seconds, the vb replicator will continue initialization
without crash. If the error persists after 30 seconds, XDCR
will not be able to start as expected.

Change-Id: I39921754887686c0b969b53eb0e4a5764b385145
Merge "MB-9612: handling remote_cluster_info error more gracefully" into for-rackaware
MB-9660: added streamingUri to terse bucket info

Because we're also sending terse bucket info as replies for streaming
bucket details. And java client expects streamingUri there and crashes
otherwise.

Change-Id: Id2c29e342a970b86af05fb99cadc084c4dff9a20
Reviewed-on: http://review.couchbase.org/30769
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9634 fix the description of avg_bg_wait_time stat

Change-Id: I6dc8cb120168c9a3a283a734e3c4a095927d9898
Reviewed-on: http://review.couchbase.org/30773
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Don't ignore content type in json_request_hilevel.

It's actually used by menelaus_web:handle_join_tail/5.

Change-Id: I4bccfd2cd3763ecba74e3f7a1971fc7320808079
Reviewed-on: http://review.couchbase.org/30790
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-1143 Rack-aware vbucket map generation updates.

  1. Multi-replica case is handled much better now: fully rack-aware
  vbucket map is generated almost always when it's possible.
  2. Best effort. Few things are tried in order:

     a. change number of slaves
     b. sacrifice rack awareness for replicas (master is still
     guaranteed to be on a different rack)
     c. sacrifice rack awareness for master too
     d. sacrifice replica vbuckets balance

Change-Id: I6daa85a26d54ab65e4bb2f0c3a0e0dc35a0d34cb
Reviewed-on: http://review.couchbase.org/30789
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
bp:Create install/bin earlier

Create the install/bin directory before it is used
the first time.

Prior to this change it made the buildbot fail [1].

[1] http://factory.couchbase.com/view/commit_validation/view/couchdb/job/couchdb-gerrit-views-pre-merge-master/71/console

Change-Id: Idfe33f37fab84f68954a4e48788b5f4595330848
Orig-Change-Id: If9b7ede8ea86d2d9307899b8a203a91d2c04552d
Reviewed-on: http://review.couchbase.org/30843
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
added script to validate vbmap rack awareness constraint

Change-Id: I17808d0e92470ee610ca4503b65e5059580f381f
Reviewed-on: http://review.couchbase.org/30854
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Print for how many vbuckets rack constraints are broken.

Two kinds of violations are considered:

  1. Violation is "strict" when master resides on the same rack as any of
  its replicas.

  2. Violation is "weak" when master resides on a different rack, but some
  of the replicas reside on the same rack.

Change-Id: I7bcc52035bc56704cf38e711c82bb69f70bdf3bc
Reviewed-on: http://review.couchbase.org/30857
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9652: avoid restarting net_kernel unless absolutely necessary

One cause of issues in the ticket appears to be net_kernel
shutdowns. In most common case of not assigning hostnames this is not
actually required. So we don't touch it in this cases.

It certainly doesn't address root of the problem (which is still
unknown at this time but is believed to be somewhere within erlang
itself). But at least this commit should buy us enough time to
investigate and fix/workaround it.

Change-Id: I246f7180e6c49552f338cfefdf746775c48b6778
Reviewed-on: http://review.couchbase.org/30873
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Handle non kv-list error_logger reports.

Change-Id: I3cdf094eba418f7a4408b4cb8ce61e3c03bee768
Reviewed-on: http://review.couchbase.org/30874
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9678: require rebalance after offline upgrade

After offline upgrade (as opposed to rebalance upgrade) we have all
buckets without map_opts_hash property. Which was causing our logic to
detect server group assignment changes to fail detecting that
rebalance is required.

Simplest possible solution is to simply always require rebalance if
map_opts_hash is undefined. Right after rebalance upgrade that would
be empty rebalance which is slightly suboptimal. But given it's so
much KISS-ful I'm more than ok with that small glitch.

Change-Id: I97002ac02fd6897c95b4dee4575306a5fb80eeb9
Reviewed-on: http://review.couchbase.org/30876
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9679 Treat star and chain maps compatible if num_replicas=1.

Change-Id: Ifa8daa91271989fb0f81b1d5181c0412019d5574
Reviewed-on: http://review.couchbase.org/30877
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9501: protocol column for ongoing replications list

Change-Id: If7d232e3f8a562a33fd3b917191c4622074e9197
Reviewed-on: http://review.couchbase.org/30713
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
added colons to replication advanced settings labels

Change-Id: I26c41b4ae614e920b2ebf674c50ca7981038e4df
Reviewed-on: http://review.couchbase.org/30714
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-6983: binary and decimal prefixes

extension of truncateTo3Digits is necessary because
we can get 1000K instead of 1M in some cases

Change-Id: Ib747e076e47d6e5f6b87deadd41ad26c247abfc7
Reviewed-on: http://review.couchbase.org/30214
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9644: do not allow updating bucket during rebalance

Otherwise our attempt to request janitor run for possible update of
replicas count crashes rebalance.

Change-Id: Iadf03e117cb35e7ab311d353a1a252e771873857
Reviewed-on: http://review.couchbase.org/30878
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-100: log loaded replication documents

I.e. to make diagnosing issues like MB-9647 easier.

Change-Id: I35c5973367738a2c606b0812c4343e01d83b000a
Reviewed-on: http://review.couchbase.org/30879
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
MB-9548 delete all replications from the bucket

... before deleting the bucket

Change-Id: I4fc0f81ed243ebbb2bed99cb79865bf403e68026
Reviewed-on: http://review.couchbase.org/30750
Tested-by: Artem Stemkovski <artem@couchbase.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>