History log of /6.6.0/kv_engine/engines/ep/src/monotonic.h (Results 1 - 18 of 18)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.0.2, v6.6.3, v7.0.1, v7.0.0, v6.6.2, v6.5.2, v6.6.1, v6.0.5, v6.6.0, v6.5.1, v6.0.4, v6.5.0, v6.0.3
# 95d5e377 18-Sep-2019 Dave Rigby <daver@couchbase.com>

Rename WeaklyAtomicMonotonic to AtomicWeaklyMonotonic

The previous name was potentially confusing - the monotonicity is the
thing which is weak, not the atomicity :)

Change-Id:

Rename WeaklyAtomicMonotonic to AtomicWeaklyMonotonic

The previous name was potentially confusing - the monotonicity is the
thing which is weak, not the atomicity :)

Change-Id: I2e3fef3c0d60d88e91909d13833b0c6324bf4433
Reviewed-on: http://review.couchbase.org/114959
Reviewed-by: James Harrison <james.harrison@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# eae119e0 16-Aug-2019 Dave Rigby <daver@couchbase.com>

Minimise includes of kv_bucket.h

Change-Id: I489b23efe69e44db51602a52d4e01f275959034b
Reviewed-on: http://review.couchbase.org/113438
Tested-by: Build Bot <build@couchbase.com>
R

Minimise includes of kv_bucket.h

Change-Id: I489b23efe69e44db51602a52d4e01f275959034b
Reviewed-on: http://review.couchbase.org/113438
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>

show more ...


# c35974d9 15-Aug-2019 Jim Walker <jim@couchbase.com>

MB-34955: Reduce the size of Monotonic instances when they do not throw

Move the std::string label to the throwing variant of
Monotonic/AtomicMonotonic's base class (ThrowExceptionPolicy

MB-34955: Reduce the size of Monotonic instances when they do not throw

Move the std::string label to the throwing variant of
Monotonic/AtomicMonotonic's base class (ThrowExceptionPolicy).

This results in only Monotonic instances which can throw pay the
storage cost of the label. This means all instances when built
CB_DEVELOPMENT_ASSERTS or when a Monotonic explicitly uses
the ThrowExceptionPolicy

The result: On a single node an empty bucket's (1024 vbuckets
and CB_DEVELOPMENT_ASSERTS=false):

* mem_used is 60MB without this commit
* mem_used is 44MB with this commit

Change-Id: Ia0e02c13d8c59c9cc474de059c2ec2ef39614df1
Reviewed-on: http://review.couchbase.org/113372
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 2e8f2272 10-Jul-2019 James Harrison <james.harrison@couchbase.com>

Allow Monotonic to use custom types with to_string defined

ThrowExceptionPolicy tries to log the current and new values when the
Monotonic Invariant fails. Rather than specifying

Allow Monotonic to use custom types with to_string defined

ThrowExceptionPolicy tries to log the current and new values when the
Monotonic Invariant fails. Rather than specifying

std::to_string(value)

use

using std::to_string
... to_string(value) ...

to allow the use of custom defined `to_string` (e.g., through ADL)

Change-Id: Ibef1671f72adcec92fec2dcf28978583f2cadc14
Reviewed-on: http://review.couchbase.org/111811
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# d7b4ae29 02-Jul-2019 Dave Rigby <daver@couchbase.com>

Add labels to {Atomic,Weakly,}Monotonic

Add support for a label to be associated with the various Monotonic
template class instantiations. This aids in reporting of monotonic
invaria

Add labels to {Atomic,Weakly,}Monotonic

Add support for a label to be associated with the various Monotonic
template class instantiations. This aids in reporting of monotonic
invariants being broken - previously there was little context on
exactly what had failed. Example output:

Monotonic<x> (ActiveDM(vb:0)::State::lastAbortedSeqno) invariant failed: new value (302) breaks invariant on current value (303)

Note this increases the size of Monotonic from sizeof(T) to ~
sizeof(T) + 24. Where Monotonic was used where a specific size was
relied on, updates usages to use Monotonic::value_type which is the
underlying templated type.

Change-Id: I1a9445ab24d9136361537fd1bfd9e100406b1a81
Reviewed-on: http://review.couchbase.org/111506
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: James Harrison <james.harrison@couchbase.com>

show more ...


# 25de7e4d 02-Jul-2019 Dave Rigby <daver@couchbase.com>

Use CB_DEVELOPMENT_ASSERTS to control default Monotonic policy

Change DefaultOrderReversedPolicy to be defined based on
CB_DEVELOPMENT_ASSERTS instead of NDEBUG - this makes it match

Use CB_DEVELOPMENT_ASSERTS to control default Monotonic policy

Change DefaultOrderReversedPolicy to be defined based on
CB_DEVELOPMENT_ASSERTS instead of NDEBUG - this makes it match
NonNegativeCounter, giving us additional debug checks while in the
pre-release phase.

Change-Id: Iff92da0ec5a112969130d7cdf2e9e97350bc0356
Reviewed-on: http://review.couchbase.org/111504
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>

show more ...


# a85b9c5c 10-May-2019 Dave Rigby <daver@couchbase.com>

Avoid <functional> for Monotonic

Monotonic<> requires <functional> for std::greater and
std::greater_equal. However they are two one-liner function objects
out of a 2,500+ line heade

Avoid <functional> for Monotonic

Monotonic<> requires <functional> for std::greater and
std::greater_equal. However they are two one-liner function objects
out of a 2,500+ line header (plus it's dependancies!).

Replace with our own implementations of std::greater &
std::greater_equal.

Change-Id: Ic47ecaa696a36a8bd8bb09e7f75716cbb8f2f3cc
Reviewed-on: http://review.couchbase.org/108973
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.5.4, v5.5.5, v5.5.6, v6.0.1
# e6d6c24e 10-Dec-2018 Ben Huddleston <ben.huddleston@couchbase.com>

MB-31810: Allow users to specify memory order in AtomicMonotonic

Allow a user to specify the memory order they wish to use in
AtomicMonotonic by flipping the operator= and store implemen

MB-31810: Allow users to specify memory order in AtomicMonotonic

Allow a user to specify the memory order they wish to use in
AtomicMonotonic by flipping the operator= and store implementations
and supplying an optional memory order. Allow a user to also specify
the memory order for loads and resets.

Change-Id: I8fa7e992b2188e18136404fdca7f8f21d004afde
Reviewed-on: http://review.couchbase.org/102638
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v5.5.3, v6.0.0, v5.1.3, v5.5.2, v5.5.1, v5.1.2, v5.1.1
# a42eaba7 02-Feb-2018 Dave Rigby <daver@couchbase.com>

MB-27769: BufferLog: add range checks to bytesOutstanding & acked

Change the types of ackedBytes to be Monotonic<> - it should never go
backwards.

Similary for bytesOutstanding

MB-27769: BufferLog: add range checks to bytesOutstanding & acked

Change the types of ackedBytes to be Monotonic<> - it should never go
backwards.

Similary for bytesOutstanding - change it to NonNegativeCounter. Note
that bytesOutstanding was previously named bytesSent; however that's
somewhat misleading as it impled (to me at least) a total amount sent,
not the current anount outstanding.

Check that we don't try to acknowledge more bytes than are outstanding
(in release_UNLOCKED) - throw a logic_error if that is the case.

Change-Id: I168ff9f5ab93bf5c2d5dcae0224cfb1a19895111
Reviewed-on: http://review.couchbase.org/88768
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.0.1, v5.1.0, v5.0.0
# 63755669 30-Jun-2017 Dave Rigby <daver@couchbase.com>

Monotonic: Add pre- and post- increment operators

These are needed to expand the use of Monotonic for variables which
use operator++.

Change-Id: Id07c116366000bf58e074c96107a577

Monotonic: Add pre- and post- increment operators

These are needed to expand the use of Monotonic for variables which
use operator++.

Change-Id: Id07c116366000bf58e074c96107a577f70718561
Reviewed-on: http://review.couchbase.org/80231
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# c472efcf 30-Jun-2017 Dave Rigby <daver@couchbase.com>

Add Weak variants of Monotonic<> & AtomicMonotonic<>

Expand Monotonic & AtomicMonotonic to allow the Invariant which should
be maintained to be specified. By default this is std::greater

Add Weak variants of Monotonic<> & AtomicMonotonic<>

Expand Monotonic & AtomicMonotonic to allow the Invariant which should
be maintained to be specified. By default this is std::greater, which
behaves as it previoulsy did (i.e. Strongly Increasing), but by
instantiating with std::greater_equal we allow a Weakly Increasing
type - WeaklyMonotonic and WeaklyAtomicMonotonic.

Change-Id: Ib0734e5db67af813869a876c5fde6a3cae5c6cbd
Reviewed-on: http://review.couchbase.org/80229
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9297e410 30-Jun-2017 Dave Rigby <daver@couchbase.com>

Monotonic: Use ThrowExceptionPolicy by default in Debug builds

Allows us to detect any instances of monotonic invariants being broken
when running in a debug (non-production) build, if t

Monotonic: Use ThrowExceptionPolicy by default in Debug builds

Allows us to detect any instances of monotonic invariants being broken
when running in a debug (non-production) build, if the user didn't
explicitly pick a policy.

Change-Id: Ie28da460253e7973e9ce01ec056caff63d4beea2
Reviewed-on: http://review.couchbase.org/80228
Reviewed-by: James Harrison <james.harrison@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 705ef4b1 30-Jun-2017 Dave Rigby <daver@couchbase.com>

Monotonic: Add atomic variant and policy control

1. Add an atomic variant of Monotonic<> - AtomicMonotonic<>. This
wraps the specified type in std::atomic, and uses compare-exchange

Monotonic: Add atomic variant and policy control

1. Add an atomic variant of Monotonic<> - AtomicMonotonic<>. This
wraps the specified type in std::atomic, and uses compare-exchange
to allow concurrent access.

2. Allow the behavour of Monotonic<> & AtomicMonotonic when the
desired value is non-increasing to be customized. The original
behaviour (ignore the update) is still the default, but users can
choose to have an exception thown instead.

(Re-apply after revert, to add workaround for GCC 4.8 initializer list
bug).

Change-Id: I048fda6f7f8fea178d7a1fe00c9c7f6f973575bb
Reviewed-on: http://review.couchbase.org/81280
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


# 73881633 22-Jul-2017 Chris Hillery <ceej@couchbase.com>

Revert "Monotonic: Add atomic variant and policy control"
Revert "Use AtomicMonotonic for ActiveStream::lastReadSeqno"

This reverts commits db38f28ea7d3d7f2b02c4680a830b128eb69f9a7 and

Revert "Monotonic: Add atomic variant and policy control"
Revert "Use AtomicMonotonic for ActiveStream::lastReadSeqno"

This reverts commits db38f28ea7d3d7f2b02c4680a830b128eb69f9a7 and
6762af9a382dc27fee5bfe424eea65b317312403, which were breaking the build
on a number of platforms.

Change-Id: I4971103fe0c413f5b6851ee1a23e5e1aec0e9ae4
Reviewed-on: http://review.couchbase.org/81271
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Chris Hillery <ceej@couchbase.com>

show more ...


# db38f28e 30-Jun-2017 Dave Rigby <daver@couchbase.com>

Monotonic: Add atomic variant and policy control

1. Add an atomic variant of Monotonic<> - AtomicMonotonic<>. This
wraps the specified type in std::atomic, and uses compare-exchange

Monotonic: Add atomic variant and policy control

1. Add an atomic variant of Monotonic<> - AtomicMonotonic<>. This
wraps the specified type in std::atomic, and uses compare-exchange
to allow concurrent access.

2. Allow the behavour of Monotonic<> & AtomicMonotonic when the
desired value is non-increasing to be customized. The original
behaviour (ignore the update) is still the default, but users can
choose to have an exception thown instead.

Change-Id: Icfb61f4b82b517491857ee114c3d3c4d2db732e3
Reviewed-on: http://review.couchbase.org/80225
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# ef22f9b0 25-May-2017 Dave Rigby <daver@couchbase.com>

Move ep-engine to engines/ep


Revision tags: v4.6.2_ep, v4.6.2_mc
# df176008 08-Mar-2017 Manu Dhundi <manu@couchbase.com>

[Ephemeral Bucket]: Add point-in-time snapshot rangeRead on LinkedList

Monotonically point-in-time snapshots which can be used for
incremental DCP. This is implemented in the sequential

[Ephemeral Bucket]: Add point-in-time snapshot rangeRead on LinkedList

Monotonically point-in-time snapshots which can be used for
incremental DCP. This is implemented in the sequential data structure
'BasicLinkedList' in EphemeralVBuckets. This is equivalent to DCP disk
backfill in Couchbase buckets.

To get a point-in-time snapshot from the list, the main requirement is
no de-deduplication be allowed on the list in the range where the read
for the snapshot is happening. We achieve it by not blocking
the writes on the list during the time of the range read.

This commit implements only the range read part. The non-blocking
write during a range read will be evident with implementation of
updateListElem in an upcoming commit.

Change-Id: I80eeb760e94730645f4d20ec6a8de5ce81da7d26
Reviewed-on: http://review.couchbase.org/74639
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v4.6.1_ep
# e4c718e9 12-Jan-2017 Manu Dhundi <manu@couchbase.com>

[Refactor]: Move queueDirty() go from KVBucket to VBucket

KVBucket::queueDirty() is a function used to put an item onto checkpoint
after it is inserted into hash table. Both hash table a

[Refactor]: Move queueDirty() go from KVBucket to VBucket

KVBucket::queueDirty() is a function used to put an item onto checkpoint
after it is inserted into hash table. Both hash table and checkpoint are
members of VBucket class and hence it is more appropriate to implement
this function in VBucket class.

Also, added VBUpdateReturnCtx which will indicate the KVBucket on the
actions to be taken after adding/deleting/updating an item in VBucket.

Implementing this functions in VBucket class will help in refactoring
calls to hash table and also result better abstraction.

Change-Id: I74ecdd774a88981feb482a34d375f38a12cfc900
Reviewed-on: http://review.couchbase.org/71569
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...