History log of /6.0.3/kv_engine/engines/default_engine/items.h (Results 1 - 25 of 50)
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, v5.5.4, v5.5.5, v5.5.6, v6.0.1, v5.5.3, v6.0.0, v5.1.3, v5.5.2, v5.5.1, v5.1.2, v5.1.1
# ab711953 07-Mar-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-27661 [11/n]: Fix MSVC warnings - C4267

This patch addresses the following generated warnings:

C4267 - var : conversion from 'size_t' to 'type', possible loss of data

MB-27661 [11/n]: Fix MSVC warnings - C4267

This patch addresses the following generated warnings:

C4267 - var : conversion from 'size_t' to 'type', possible loss of data
The compiler detected a conversion from size_t to a smaller type.

This is the second and final commit addressing this error.

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

show more ...


Revision tags: v5.0.1, v5.1.0, v5.0.0
# 2c409887 16-Aug-2017 Trond Norbye <trond.norbye@gmail.com>

Fix race condition in default_engine:get_item_info

When a thread fetch the object it grabs the item mutex and
bumps the refcount of the item. That means that no one can
change the (u

Fix race condition in default_engine:get_item_info

When a thread fetch the object it grabs the item mutex and
bumps the refcount of the item. That means that no one can
change the (user visible) properties on the underlying item.

Another thread may however grab the item mutex and toggle
the user invisible properties of the object (such as replacing
the value for a key by injecting a new item into the hashtable.

When we added support for locked items we started to look at
the iflag section in the item, which is one of the "internal
state variables" which could be modified while holding the
item mutex.

This patch change iflag to std::atomic as we don't want
to slow down get_item_info by locking the entire item
storage to check the internal flags.

This may potentially open up for a race, but:

1) If the item isn't linked anymore we don't need to mask
the CAS anymore. (if the client tries to use that
CAS it'll fail with an invalid cas)

2) In production the memcached buckets don't use the
ZOMBIE state

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

show more ...


# 8f9005d0 14-Jun-2017 Jim Walker <jim@couchbase.com>

MB-22163: Recover value-eviction performance loss with store_if

Introduce a new engine method called store_if, this method
is exactly like store but takes a predicate (std::function).

MB-22163: Recover value-eviction performance loss with store_if

Introduce a new engine method called store_if, this method
is exactly like store but takes a predicate (std::function).

For set and replace, they will call the predicate on the existing
item (if any) and if the predicate returns true, the store will
continue.

Memcached is changed to make use of store_if so that it can avoid
a get for determining if an existing item has xattrs.

store_if is tried first and if it fails because the existing item
has xattrs, then the slower read/modify/write path is chosen.

This recovers approx 10% in op/s primarily because we reduce the
hash-table locking (your mileage may vary).

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

show more ...


# 753d8721 13-Apr-2017 Trond Norbye <trond.norbye@gmail.com>

MB-23875: Implement GAT and TOUCH in the core [2/2]

The motivation for this is to decouple the protocol encoding
of the commands from the engine implementation, and to fix
problems w

MB-23875: Implement GAT and TOUCH in the core [2/2]

The motivation for this is to decouple the protocol encoding
of the commands from the engine implementation, and to fix
problems with these commands not being included in the
global counters for the command count.

As an extra benefit we can add end to end test through
commit validation as it is supported in all engines.

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

show more ...


Revision tags: v4.6.2_ep
# f068119e 31-Mar-2017 Trond Norbye <trond.norbye@gmail.com>

Refactor: use DocStateFilter for engine->get()

Change-Id: Ied4fa5cdd9520a449eac4ccd33be51cdbacc6f37
Reviewed-on: http://review.couchbase.org/76116
Reviewed-by: Dave Rigby <daver@couc

Refactor: use DocStateFilter for engine->get()

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

show more ...


Revision tags: v4.6.2_mc, v4.6.1_ep
# 98b69964 09-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Add more docs to hash_item

Also release 1 byte of "internal flags" as we only use 3
bits out of the 16 bits we've reserved.

In addition I've sorted the variabels with the widest

Add more docs to hash_item

Also release 1 byte of "internal flags" as we only use 3
bits out of the 16 bits we've reserved.

In addition I've sorted the variabels with the widest
datatypes first (and added a comment in the end with the
number of bytes availabe in the struct).

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

show more ...


# fb3b37a2 09-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Add support for document locking in default_bucket

Change-Id: Ic72624166b7a4cbd565ca57a03bdfe0436bd7760
Reviewed-on: http://review.couchbase.org/71761
Reviewed-by: Dave Rigby <daver@

Add support for document locking in default_bucket

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

show more ...


# 2234cd91 10-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Delete unused TAP and DCP code from memcached bucket

Change-Id: Iaaa07c6d0fb57a62fb6f885bb5cd5b5a48a7d15f
Reviewed-on: http://review.couchbase.org/71791
Tested-by: buildbot <build@co

Delete unused TAP and DCP code from memcached bucket

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

show more ...


# 22eb2257 06-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Remove support for running without cas

(As part of the refactor we've done in the core by implementing
various commands by using CAS we cannot run without CAS anymore.
It has never b

Remove support for running without cas

(As part of the refactor we've done in the core by implementing
various commands by using CAS we cannot run without CAS anymore.
It has never been a public API to disable CAS so nuking it should
be safe)

Change-Id: I26a33805877e932c2274b3c5d019420c3fa82934
Reviewed-on: http://review.couchbase.org/71646
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


# 19361e07 22-Dec-2016 Trond Norbye <trond.norbye@gmail.com>

Remove CB_INLINE now that we're C++

Change-Id: I8bb1350681e40154801971d101e7a8ed93a95563
Reviewed-on: http://review.couchbase.org/71253
Tested-by: buildbot <build@couchbase.com>

Remove CB_INLINE now that we're C++

Change-Id: I8bb1350681e40154801971d101e7a8ed93a95563
Reviewed-on: http://review.couchbase.org/71253
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>

show more ...


# 374efa4b 10-Dec-2016 Trond Norbye <trond.norbye@gmail.com>

Add support for keeping deleted items in memcached buckets

We need this for unit testing of subdoc access to operate
on deleted items.

It is enabled by setting the configuration

Add support for keeping deleted items in memcached buckets

We need this for unit testing of subdoc access to operate
on deleted items.

It is enabled by setting the configuration parameter

keep_deleted=true

With that option enabled they're treated just as a normal
entry in the cache with respect to the LRU, but not
returned unless explicitly asked for.

Change-Id: I3dff83c200f96b48fa40a1aa0337419b0adc52a5
Reviewed-on: http://review.couchbase.org/70857
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


Revision tags: v4.6.0_ep, v4.5.1-MP1_mc, v4.6.0-DP_mc, v4.6.0-DP_ep
# bf7ee064 10-Oct-2016 Trond Norbye <trond.norbye@gmail.com>

Let the core implement arithmetic

The motivation behind this is to avoid having to implement
support for XATTRs in all underlying engines

Change-Id: Ibd87139595e09537a7bf13ce34d

Let the core implement arithmetic

The motivation behind this is to avoid having to implement
support for XATTRs in all underlying engines

Change-Id: Ibd87139595e09537a7bf13ce34d1baac471f9b56
Reviewed-on: http://review.couchbase.org/68558
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v4.5.1-MP1_ep, v4.1.2-MP2_mc, v4.5.1_mc, v4.6.0_mc, v4.1.2-MP1_ep, v3.1.6_ep, v4.5.0_mc, v4.5.0_ep, v4.1.1_ep, v3.1.5_ep, v4.1.1_mc, v3.1.4_ep, v3.1.4_mc, v3.1.5_mc, v3.1.3_ep, v4.1.0_ep, v3.1.2_ep, v4.1.0_mc, v3.1.2_mc, v3.1.1_mc, v3.1.1_ep
# 77f3c4f3 03-Sep-2015 Trond Norbye <trond.norbye@gmail.com>

MB-16225: Remove support for delayed flush

Change-Id: Ia5c9e30cff4a9bb7344080b8416b86d233ea1751
Reviewed-on: http://review.couchbase.org/55018
Reviewed-by: Dave Rigby <daver@couchbas

MB-16225: Remove support for delayed flush

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

show more ...


Revision tags: v4.0.0_ep, v4.0.0_mc, v3.1.0_ep, v3.1.0_mc, v3.1.6_mc
# 9e056c86 10-Jul-2015 Trond Norbye <trond.norbye@gmail.com>

Remove dead code (stats item_cachedump)

Change-Id: Ifea194212b60b3b6869620009a3d15568609dbb6
Reviewed-on: http://review.couchbase.org/53058
Tested-by: buildbot <build@couchbase.com>

Remove dead code (stats item_cachedump)

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

show more ...


Revision tags: v3.0.2-MP2_mc
# 6bbec722 12-Dec-2014 jim <jim@couchbase.com>

Tynset - A multi-bucket default_engine

1. All buckets store their items in a single hash_table (assoc).
1.1 Each item key now has a bucket_id prepended to the key string.
1.2 The eng

Tynset - A multi-bucket default_engine

1. All buckets store their items in a single hash_table (assoc).
1.1 Each item key now has a bucket_id prepended to the key string.
1.2 The engine->assoc points to the single table and all code still
manipulates the table via the engine handle.

2. The bucket_id is managed by memcached 'core'
2.1 The bucket_id is a 32-bit unsigned integer which increments for
every bucket creation the process receives.
2.2 The bucket_id is not persisted, the same bucket after a restart is not
guaranteed the same bucket_id (this is subject to future change).
2.3 The bucket_id must not wrap (i.e. a bucket_id can't be reused)

3. Bucket deletion is performed by the item scrubber.
3.1 A single scrubber thread has a queue of engine's to scrub and delete.
3.2 Global cleanup/shutdown collects this single thread so that the DLL
can be safely unloaded.

Change-Id: Idc2bb6748dc75a227c97ad9c44445758b88015b0
Reviewed-on: http://review.couchbase.org/50122
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# d963d772 29-Dec-2014 Dave Rigby <daver@couchbase.com>

MB-13011: Return updated item* on successful arithmetic operation

To facilitate passing additional information about mutations back to
the client, refactor the arithmetic API to return a

MB-13011: Return updated item* on successful arithmetic operation

To facilitate passing additional information about mutations back to
the client, refactor the arithmetic API to return a pointer to the
updated item*. This can then be queried by the frontend (using
get_item_info) to obtain additional information (such as vbucket UUID
and seqno).

Previously CAS was also returned, but this can now be obtained from
get_item_info() so it has been removed from the interface.

Change-Id: If45cc21e04201614b4ff6df75abb762d3623605a
Reviewed-on: http://review.couchbase.org/44714
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v3.0.2_ep, v3.0.2_mc, v3.0.1_mc, v3.0.0_ep, v3.0.0-beta3_mc, v3.0.0_mc, v3.0.0-beta2_mc
# f1818198 23-Jul-2014 Trond Norbye <trond.norbye@gmail.com>

Refactor: rename UPR to DCP

Change-Id: Idc9f5c4561fbf5bf011ca1dbed5ad00a64c67fa0
Reviewed-on: http://review.couchbase.org/39747
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

Refactor: rename UPR to DCP

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

show more ...


Revision tags: v3.0.0-beta1_mc
# ee7191d1 29-Apr-2014 David Liao <liaodw@gmail.com>

MB-10640 UPR Stream Request and Stream Marker changes

Added new fields for stream req:
snap_start_seqno
snap_end_seqno

Removed:
high_seqno

Added new fields for

MB-10640 UPR Stream Request and Stream Marker changes

Added new fields for stream req:
snap_start_seqno
snap_end_seqno

Removed:
high_seqno

Added new fields for marker:
start_seqno
end_seqno
flags

Change-Id: I4f7528f453e1f0c3021ab51f2173e111ed4a17e9
Reviewed-on: http://review.couchbase.org/36433
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>

show more ...


Revision tags: v2.5.1_ep, v2.5.1-MP1-A_mc, v2.5.0_mc
# 1639b21a 10-Jan-2014 abhinavdangeti <abhinav@couchbase.com>

MB-8552: Add support for datatype field

Linking ep_engine change:
http://review.couchbase.org/#/c/31046/

Change-Id: I3d67a79fa685f584db198a47b4758c56d1d9fbfb
Reviewed-on: ht

MB-8552: Add support for datatype field

Linking ep_engine change:
http://review.couchbase.org/#/c/31046/

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

show more ...


Revision tags: v2.5.0-dp1_mc
# e7e6249a 16-Oct-2013 Trond Norbye <trond.norbye@gmail.com>

Changes due to modifications of the spec

Change-Id: I7a200871ca01bdc1d9080eaaac3b5297b09edc49
Reviewed-on: http://review.couchbase.org/29595
Reviewed-by: Aaron Miller <apage43@ninjaw

Changes due to modifications of the spec

Change-Id: I7a200871ca01bdc1d9080eaaac3b5297b09edc49
Reviewed-on: http://review.couchbase.org/29595
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>

show more ...


# 001dd25d 04-Sep-2013 Trond Norbye <trond.norbye@gmail.com>

Added UPR prototype

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

Added UPR prototype

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

show more ...


Revision tags: v2.2.0_mc, 2.1.1r_ep, 2.1.0r_ep, 2.0.2r_ep, 2.0.2r_mc, 2.0.1-macosx_ep, 2.0.1-linux_ep, 2.0.1-linux_mc, 2.0.0-couchbase_ep, 2.0.1-macosx_mc, v2.0.0_mc, v2.0.0-beta_mc, 1.8.1-MB-5845_ep, 2.0.0r_ep, 1.8.1_ep, v1.8.1_mc, 1.8-MB-4901_ep, v2.0.0-dp4_mc, 1.8-MB-4738_ep, 1.8.1r_ep, 1.8.0_ep, 1.8.0r_ep, 1.6.5.6_ep, 1.7.3r_ep, 1.7.2_ep, 1.7.1.1_ep, 1.6.5.5r_ep, 1.7.1_ep, 1.7.0_ep, 1.6.5.4_ep, v1.7.0_mc, 1.6.5.3.1_ep, 1.6.5.3_ep, v1.6.5.3_mc, 1.6.5.2.1_ep, 1.6.5.2_ep, v1.6.5.2_mc, 1.6.5.3r_ep
# 6f717a15 15-Feb-2011 Trond Norbye <trond.norbye@gmail.com>

Added support for TOUCH and GAT (get and touch)


Revision tags: 1.6.5.2r_ep
# b46427f0 09-Feb-2011 Trond Norbye <trond.norbye@gmail.com>

Refactor: move default_engine to a separate directory


Revision tags: 1.6.5.1_ep, v1.6.5.1_mc, 1.6.5.1r_ep, 1.7.0r_ep, 1.6.5_ep, 1.6.5r_ep, 1.6.4.1.1_ep, 1.6.4.1_ep, 1.6.4_ep, 1.6.3_ep, 1.6.4r_ep
# 15387e22 14-Nov-2010 Trond Norbye <trond.norbye@gmail.com>

Added support for tap backfill


Revision tags: 1.6.3r_ep, 1.6.2_ep, 1.6.1_ep, 1.6.1rc2_ep, 1.6.0.4_ep, 1.6.0.3_ep, 1.6.1rc1_ep
# 500e8e63 20-Oct-2010 Trond Norbye <trond.norbye@gmail.com>

Reduce the number of locks to grab for incr/decr


12