MB-8439 add decrDiskQueueSize method instead of undercount assert

DiskQueueSuze is no longer a critical variable for flusher and
checkpoint manager's decision making logics. It is simply a stat
indicating current pending disk write.

At any given point if this stat is undercounted we should just log
a warning and continue instead of assert. Otherwise, the assert
could cause a serious data loss for the crashed node.

Change-Id: I97d7b0ed6e6348578c3f35c373de779a21f469ed
Reviewed-on: http://review.couchbase.org/26897
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
CBD-963:  empty commit to create 2.1.1 branch

Change-Id: I26b122a697dc93e20347b79992c39f6233c162ca
Reviewed-on: http://review.couchbase.org/27016
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>
Remove blackhole kvstore (unused)

Change-Id: I3a3963edad727b87e57cce9f46cc6d1886cc5f14
Reviewed-on: http://review.couchbase.org/26992
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Remove unreferenced targets

Change-Id: I361345a2882238282c39c4629396e851d25473fb
Reviewed-on: http://review.couchbase.org/26993
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Drop (unused) dtrace support

Change-Id: I18bef829a77bb7f71bcc1ab8c2575f8f9a1e1805
Reviewed-on: http://review.couchbase.org/27002
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
MB-8244 add EXECUTOR_WAITING & EXECUTOR_SLEEPING

This new states will be useful for indicating which
exucutor thread (readers/writers) is waiting. This
will be available as part of readers/writers stat.

Change-Id: Id6179855ca2d430bc7d1356b40e231a1506be2b5
Reviewed-on: http://review.couchbase.org/27038
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
MB-8244 add currentTask to track currently executing task

Change-Id: I5d65ab1e2a959232d0a43abd410290344e343a6f
Reviewed-on: http://review.couchbase.org/27060
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
MB-8496: Don't require a value for non-resident meta-data

This change removes the requirement that a non-resident item
needs to have a blob that contains the valur length. This
change introduces a new flag that signals if an item has been
deleted. This change will also reduce meta data by 16 bytes for
each non-resident meta item.

Change-Id: I0d8cbcfba6415c5ff1d61610c783ae517b48848c
Reviewed-on: http://review.couchbase.org/27034
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8497: Don't track alignment for stored value size function

This code was an attempt at making the sizeof memory accounting
more accurate. We don't use this type of accounting anymore and
this actually makes things much more difficult to keep track of
since we do not adjust for alignment everywhere. On top of this
not all memory allocations are done at 8 byte intervals so this
is technically not even correct code.

Change-Id: I2ddac215bab6803643123630dd146ccd4a49fc1e
Reviewed-on: http://review.couchbase.org/27035
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8497: Remove unnecessary memory accounting code

This extra code was needed because of the alignment stuff
in the previous commit. The new code actually gets the same
numbers but using less lines of code and less atomic ops.

Change-Id: Icb15a1d07d93058f3c3d0bdc2307ac6eee698342
Reviewed-on: http://review.couchbase.org/27036
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8464: Fix crash in test_checkpoint_persistence

- test_checkpoint_persistence seen to be failing
sometimes only in Linux due to a race condition
- adjusting the checkpoint_flush_timeout before
notifying_IO_completion during notify_checkpoint_
persisted seems to have stopped this error from
occuring.

Change-Id: I6804cb9dc566e9f0d2ed831c694feda19491762a
Reviewed-on: http://review.couchbase.org/27155
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8467 Reset notifySent flag upon vbucket filter changes.

When the TAP producer receives the vbucket filter change
request from the cluster manager, it should set notifySent
flag to false, so that the TAP producer can send the TAP
OPAQUE response to the cluster manager immediately in order to
notify that the filter change request was successfully applied.

Otherwise, there can be 5 seconds unnecessary delay in sending
the reponse to the cluster manager.

Change-Id: Ie9e7720d6d2ff8a71040a95963b2065a4a58686e
Reviewed-on: http://review.couchbase.org/27156
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
MB-100: Remove unused parameter from queueDirty function

Change-Id: I51a13878eb975835ae44edf48e986f4be9c1edea
Reviewed-on: http://review.couchbase.org/27153
Reviewed-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-100: Remove EP_NO_PERSISTENCE env variable

We don't use this and have other ways of stopping persistence on
the server.

Change-Id: I303b713ddec24d6e2013b41f962b65da0aaf2949
Reviewed-on: http://review.couchbase.org/27154
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8516: Change seqNum to revSeqno in QueuedItem class

We have two different sequence numbers that we will be working with
in ep-engine and it is very confusing to figure out which on we are
talking about when the variable name is specific. The xdcr sequence
number should be revSeqno when it is used in order to distiguish it
from the by sequence number.

Change-Id: I8e2a2764deb9ffc01d0dd43c9ee5d950196a88aa
Reviewed-on: http://review.couchbase.org/27123
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8516: Change seqno to revSeqno in StoredValue class

Since we will have two different sequence numbers in our
StoredValue class we should give each one a more specific
name to reduce confusion about what variables actually
represent.

Change-Id: Ie3252f3b60ca995fd032157b631e09f44a546766
Reviewed-on: http://review.couchbase.org/27187
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-8516: Change id to bySeqno in StoredValue class

Since we will have two different sequence numbers in our
StoredValue class we should give each one a more specific
name to reduce confusion about what variables actually
represent.

Change-Id: I141d666361d7005a84884397188bcd1b7a53b894
Reviewed-on: http://review.couchbase.org/27188
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Merge remote-tracking branch 'gerrit/2.1.1' into master

Change-Id: I9c84555c8983554864656995db62c6b9fe2149d8
MB-100: Remove inconsistent checkpoint option

Change-Id: Ifde10bc40f58a52d030c060a65084300d89deee9
Reviewed-on: http://review.couchbase.org/27200
Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
MB-7590: Remove the mutation key log

In order to allow for hot items to be loaded back into
memory after the server is restarted, ep-engine keeps a
record of recently accessed/updated items. The bookkeeping
for this feature was implemented in two ways, the mutation
log and the access log. The mutation log records all
mutations into a file for the server to replay upon failure,
while the access log records the contents of the cache every
24 hours. The access log was chosen as the best way to
implement this feature since it requires less disk overhead. As
a result the mutation log has been turned off by default and
is not recommended for use. As a result this change removes the
mutation log in order to simplify the code base.

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