MB-100 Fix false failover warning.

Which appeared because misc:uniqc expects sorted input.

Change-Id: Ib183352c6915b6b852b77569ffd17b1c3cfa4204
Reviewed-on: http://review.couchbase.org/30077
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-100 Add missing space.

Change-Id: I1d41790519d2dfdb60882da009479b90db3a0a2e
Reviewed-on: http://review.couchbase.org/30071
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-100 Don't log vclock twice when conflict happens.

It's part of the raw value. So it was logged twice introducing certain
confusion.

Change-Id: I071c238c39d4e994c0740bac15df51f8e6663b51
Reviewed-on: http://review.couchbase.org/30072
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
MB-100 Simplify ns_config:merge_kv_pairs.

I removed the case that is perfectly handled by merge_list_values
already. And I'm not sure hitting this case is even possible. In
addition to that I renamed merge_list_values accordingly.

Change-Id: If988d7c1258c4fd07c4c27b3972651f02504487e
Reviewed-on: http://review.couchbase.org/30073
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100 Ensure ns_config:merge_values/2 is commutative.

That is, merge_values(A, B) equals to merge_values(B, A) for
all A and B. This seems to be enough to prevent all the potential
ping-pong situations that could theoretically still happen.

Change-Id: I1cbb087a7737964c006c9ebd64782e44e7b09ed1
Reviewed-on: http://review.couchbase.org/30074
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9430 Factor out moves minimization function.

Change-Id: I5d5d40f17789d81a17051a09baefdd8f7af68725
Reviewed-on: http://review.couchbase.org/30075
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-9430 Apply simple vbucket moves minimization to vbmap output.

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

* origin/for-rackaware:
  MB-9430 Apply simple vbucket moves minimization to vbmap output.
  MB-9430 Factor out moves minimization function.
  MB-100 Ensure ns_config:merge_values/2 is commutative.
  MB-100 Simplify ns_config:merge_kv_pairs.
  MB-100 Don't log vclock twice when conflict happens.
  MB-100 Add missing space.
  MB-100 Fix false failover warning.

Trivial merge

Change-Id: Id1d1e9e68cefd0218bf9b9b8f31d8e6162ce7c21