Add more information to compactor's log message

Include the maximum number of log files to apply per btree for each
retry phase.

Change-Id: I5189021e87818d817ce205081fdbddf2044662ce
Reviewed-on: http://review.couchbase.org/33989
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Remove not needed anymore code from compactor

Since applying the log files to the btrees is done via an external
process and spatial views have no reduce functions, this isn't needed
anymore.

Change-Id: If137a56a51c3adfc1fc973897038a1694b1f48da
Reviewed-on: http://review.couchbase.org/33990
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Add throttle option for incremental index updates

Currently the updater seems to proceed significantly faster than the
compactor, which has a retry phase not very efficient when there's many
small updates during the initial compaction phase, which makes the
compactor retry phase apply too many small log files to the new index,
causing fragmentation on the new index to be high by the time compaction
finishes. This in turn causes the compaction scheduler to schedule yet
another compaction shortly after a compaction finishes.

So for now make the updater sleep for a short period before applying each
batch if compaction is currently running and in the retry phase. Not ideal
and this is a temporary workaround which can ne disabled or adjusted at
any time by setting the sleep interval (couch_config setting throttle_period).

A better solution is to make the retry phase more efficient, faster and
causing much less fragmentation. Amongst other possibilities, merging log
files into a single batch and applying it all at once makes a big difference
in regards to efficiency and speed - basically restoring what we had until
revision 1969a700dd9dfe072608c7b5fcf324eac8ab008d but in a fully correct
way.

Change-Id: I374cbbc0b7fb01257457c4b3f81b72a332afb6ff
Reviewed-on: http://review.couchbase.org/33991
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
MB-10447 Add a wrapper script for running unit tests

The current CouchDB unit tests uses perl utility program prove
for executing and parsing etap test output. A shell script is
used to set the erlang environment variables required by the
tests. On windows platform, build system cannot run shell script
as well as perl scripts.

Added a python script that can perform parsing of etap test output
and also set necessary environment variables. CMake test framework
can make use of this script to implement cmake tests for CouchDB on
all platforms.

The script can be executed as follows:
./runtest.py -p $COUCHDB_PATH -m $COUCHDB_PATH/src/couch_set_view,$COUCHDB_PATH/src/couch_set_view/test -t test/02-old-index-cleanup.t

Change-Id: Ic8d90815901466322c32e6578fb79081b6c69cad
Reviewed-on: http://review.couchbase.org/34466
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Merge remote-tracking branch 'couchbase/master' into upr

Change-Id: I96672cc774a5ed7a81048aaf09a80c5608878128