[bp] MB-7381: allow flush with bucket credentials

Change-Id: I535a86fe265dc3bea1881ab4de0b39336c3a0ea1
Original-Reviewed-on: http://review.couchbase.org/23592
Reviewed-on: http://review.couchbase.org/23930
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7510 Computed stats of 'null' arguments are also 'null'.

It's possible to have a list of samples where the first sample
contains some stats that are missing from preceding stats. Those
missing stats in the older samples will be replaced by 'null'
values. But computed stats calculated from such samples will fail
because they expect normal values. So we'll just assume that computed
stat of 'null' argument (or arguments) is also 'null'.

This can happen if, for some reason, we were unable to grab couch
stats for some time. Or just during upgrade.

Change-Id: I6a842dc8cfe68d50c3614d0ab36a98a4a33693d6
Reviewed-on: http://review.couchbase.org/23961
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-7511 Handle pre-2.0.1 nodes when (un)inhibiting compaction.

We should not assume that there's previous compaction inhibition when
asked to compact a node. This is because this node may not support
compaction inhibition. And thus when we asked it to inhibit compaction
it replied with something that we treated as a 'nack'. And therefore,
compaction_inhibitions table doesn't have corresponding record.

Change-Id: I13505ab22717671ab631f8cc1e9d82820651c787
Reviewed-on: http://review.couchbase.org/23965
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-6595 Try to lock beam into a memory on start up.

This prevents major page faults and thus decreases chances of hitting
timeouts. Incurred memory overhead seems to be more or less constant,
though noticeable (about 200M for each node).

The user can disable this behavior by setting environment variable
COUCHBASE_ENABLE_MLOCKALL to 'false'.

The only supported platform currently is GNU/Linux.

Change-Id: I9405ac81d7e2a035bdfdd4805152e91a8ff7502f
Reviewed-on: http://review.couchbase.org/23922
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-6595 Increase erlang mseg allocator cache size.

Default cache size is 5. Our tests show that setting it to a larger
value decreases the number of minor page faults generated by
erlang and somewhat reduces the chances of hitting timeouts.

The value that is used can be overridden by setting COUCHBASE_MSEG_CACHE_SIZE
environment variable.

Change-Id: If32cce298523f184cb79e11742f68ff17fd4147b
Reviewed-on: http://review.couchbase.org/23923
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/2.0.1'

* origin/2.0.1:
  MB-6595 Increase erlang mseg allocator cache size.
  MB-6595 Try to lock beam into a memory on start up.
  MB-7511 Handle pre-2.0.1 nodes when (un)inhibiting compaction.
  MB-7510 Computed stats of 'null' arguments are also 'null'.
  [bp] MB-7381: allow flush with bucket credentials

Change-Id: Ia1cfcbf5459da9526989236a55b310e67ef3f7a4