MB-5025 disable flushall by default

Flushall operation is disabled and return as noop by default.
In the cases flushall is necessary, this change-set introduces
an engine parameter to enable the operation.

Reviewed-on: http://review.couchbase.org/15002
Reviewed-by: Dustin Sallings <dustin@spy.net>
Tested-by: Dustin Sallings <dustin@spy.net>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>

Conflicts:

	Makefile.am
	docs/engine-params.org
	ep_engine.cc
	ep_testsuite.cc

Change-Id: Iaf86ced50723bf11f88473d0b3f9595011e6553b
Reviewed-on: http://review.couchbase.org/15258
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Remove definitions for start/stop replication

These are not used anywhere in ep-engine and probably should have
been removed a while ago.

Reviewed-on: http://review.couchbase.org/15046
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>

Conflicts:

	command_ids.h
	management/mc_bin_client.py
	management/memcacheConstants.py

Change-Id: If3443878433876e4606c91faede684cc294dc3b1
Reviewed-on: http://review.couchbase.org/15259
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-4889: Don't notify tap when shutting down

On shutdown we delete the tapconnmap and tap connections before
stopping the dispatcher threads. In this particular case the
nio-dispatcher thread was notifying tap during shutdown. This fix
causes us to check for shutdown before notifying tap.

Reviewed-on: http://review.couchbase.org/14320
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>

Conflicts:

	ep_engine.cc
	ep_engine.h

Change-Id: I87ae317e21953f0ea71c64e757eb2b9c339d341e
Reviewed-on: http://review.couchbase.org/15260
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5136 Don't sleep if there are any new pending notifications.

Because the notification thread always sleeps for one second
through TapConnMap.wait(), it may result in one second delay even
if a new notification occurs when the notification thread is not
"parked" in wait. This one sec delay was also frequently observed
in vbucket takeover.

This change maintains cas-like notification counter variable that
is incremented per new notification. The notification thread
will then sleep for one sec iff the current notification counter
is different from its previous value. This change provides faster
rebalance operations.

Reviewed-on: http://review.couchbase.org/15119
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>

Conflicts:

	ep_engine.cc
	tapconnmap.hh

Change-Id: I9f307b3761ec4ba8ecf9bc00d546b633cb67b54e
Reviewed-on: http://review.couchbase.org/15261
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Remove unused connection reserve / release functions

Reviewed-on: http://review.couchbase.org/15040
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

Conflicts:

	backfill.hh

Change-Id: Ie7da3f4f206b9f550f0b1b9d343d3263fa8f4982
Reviewed-on: http://review.couchbase.org/15262
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Correct the format of the backfill completion log message.

Change-Id: I5a57765c03f75c9680900f650124fa7b26270bdc
Reviewed-on: http://review.couchbase.org/15132
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-on: http://review.couchbase.org/15263
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-5092 Use std::set to maintain the list of VB ids in VBFilter

Using std::vector introduced some bugs in maintaining the list
of sorted unique vbucket ids in VBFilter instance. This change
fixes this issue by using std::set instead.

Change-Id: I531a080cddae356b897a4feab1d5a74dc2de1ced
Reviewed-on: http://review.couchbase.org/15179
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Reviewed-on: http://review.couchbase.org/15264
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Merge branch 'branch-18'

* branch-18:
  MB-5092 Use std::set to maintain the list of VB ids in VBFilter
  Correct the format of the backfill completion log message.
  Remove unused connection reserve / release functions
  MB-5136 Don't sleep if there are any new pending notifications.
  MB-4889: Don't notify tap when shutting down
  Remove definitions for start/stop replication
  MB-5025 disable flushall by default

Change-Id: I60dd145e2dc3338419455df968a2bb4207a214ad