Remove bgfetcher retry code

Change-Id: Ic87e1506a5ec5b8f7786c73064101871a63ddf36
Reviewed-on: http://review.couchbase.org/40959
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Merge remote-tracking branch 'gerrit/3.0.1' into master

Change-Id: I09bbd9e506c65260feab6c345fc0a6c0fb5e42c2
Merge remote-tracking branch 'gerrit/3.0.1' into master

Change-Id: I0d53fc77023a7bdfa7fcda50272240a9d4141a30
Fix errors in Blob comments

Spotted a few typos / inaccurate comments in the Blob class. Fix them.

Change-Id: I285a21307b2332bc2bdd84dce3fbb6728eeb8404
Reviewed-on: http://review.couchbase.org/41391
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Move persistence cursor into list of all cursors

We have a lot of duplicate code for handling the persistence and
tap cursors. All of this code functions in the same way so it's
better if we just keep all of the cursors in the checkpoint manager
in one place.

Change-Id: Ifab7331a7e0ef7b8528a6e3323847acd1e14caa9
Reviewed-on: http://review.couchbase.org/41459
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Remove hasNextForPersistence()

We no longer need this function because the hasNext() function can
be used to figure out if the persistence cursor has another item.

Change-Id: Idf315e4922f1d1c1e6fc7401b5477ae5ef824978
Reviewed-on: http://review.couchbase.org/41506
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Persistence cursor shouldn't be registered to be reset on collapse

If checkpoints are collapsed we shouldn't put the cursor back into
the collapsed checkpoint.

Change-Id: I059a3833defe05cb2218dcb677e732a532511801
Reviewed-on: http://review.couchbase.org/41558
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Fix checkpoint unit test caused by expecting wrong num of cursors

We put all of the cursors in the same structure now so we will
always have at least one cursor since we never remove the
persistence cursor.

Change-Id: Iea9e559ea72e200d71c36fcc20bd5b67c7435d10
Reviewed-on: http://review.couchbase.org/41559
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Remove duplicate code for getting number of items for a cursor

We no longer need this function because the getNumItemsForCursor()
function can be used to figure out how many items are remaining
for the persistence cursor.

Change-Id: Ibe5a515785dbaa2c3d40582d855504079b3a83f2
Reviewed-on: http://review.couchbase.org/41507
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Remove unneeded function getMutationIdByKey()

This function was only used by our testing framework and since each
queued_item instance contains the mutation id (by seqno) we no
longer need this function in order to get this information.

Change-Id: I8e1fbe31380c0cc1837342fe3ac9e65d570a116f
Reviewed-on: http://review.couchbase.org/41508
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Rename checkpoint manager functions with TAP in them

We use the checkpoint maanger for many different cursor types so
we shouldn't have TAP in the names of functions in order to
advertise them as being more general.

Change-Id: I2f17d4db9332b2f5c52cb4e0764bf76bb982864a
Reviewed-on: http://review.couchbase.org/41509
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Remove unused endSeqno in nextItem function

Change-Id: I834734b471be3082e709d958ec8409a626e87dab
Reviewed-on: http://review.couchbase.org/41561
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Remove duplicate code for getting all items from checkpoint

Change-Id: I320cddf9ecd7ae0947abaf33add5065ce50f442c
Reviewed-on: http://review.couchbase.org/41560
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Merge remote-tracking branch 'gerrit/3.0.1' into master

Change-Id: I0a0424c293f085fb83cd6e7c9765994b0f817f45
Remove unused errinfo field (will be removed from API)

Change-Id: Ib8cd1426d313ea9493076899f826250f07992a9a
Reviewed-on: http://review.couchbase.org/41639
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Merge remote-tracking branch 'gerrit/3.0.1' into Master

Change-Id: Id580f60dabe6e9541cf21fbb52937acfda6efd27
MB-12268: Adding a debug log, when clusterConfig is updated

Change-Id: I0cbb70789f84bddc644bdc4ee59c1e86e1821220
Reviewed-on: http://review.couchbase.org/41746
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: abhinav dangeti <abhinav@couchbase.com>
Reviewed-on: http://review.couchbase.org/41824
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
use optparse instead of arg_parse cbvdiff for compatibility

Change-Id: I604354823c71b91a167646c01e2bb6ea9d8c8822
Reviewed-on: http://review.couchbase.org/41752
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Remove EPStats from CouchKVStore

Change-Id: Ifdd48857e076b57606a65a49521d9021556dd8ac
Refactor database scan code

Change-Id: Ifa1b6f9524fe5b20d6d522fcbabb822e36e66957