History log of /4.5.1-MP3/memcached/ (Results 1 - 25 of 2881)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v4.6.3, v4.6.2-MP3, v4.6.5, v4.6.2, v4.5.1-MP1, v4.6.0-DP, v4.1.2-MP2
ed65461a04-Sep-2016 Trond Norbye <trond.norbye@gmail.com>

MB-21832: Catch errors during final flush of ssl pipe

We need to extend the test framework with methods to inject
socket errors in order to create a unit test for this.

Change-I

MB-21832: Catch errors during final flush of ssl pipe

We need to extend the test framework with methods to inject
socket errors in order to create a unit test for this.

Change-Id: I29972db6de6de7c36730a72778792d55a9c71589
Reviewed-on: http://review.couchbase.org/67354
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-on: http://review.couchbase.org/70506
Reviewed-by: Manu Dhundi <manu@couchbase.com>

show more ...

aa8c067104-Nov-2016 Mark Nunberg <mnunberg@haskalah.org>

MB-21597: Use OPERATION_CAS rather than OPERATION_REPLACE

REPLACE means unconditional replace in old-style Memcached parlance.
CAS is the actual operation required, as it actually verifi

MB-21597: Use OPERATION_CAS rather than OPERATION_REPLACE

REPLACE means unconditional replace in old-style Memcached parlance.
CAS is the actual operation required, as it actually verifies the CAS.
See e.g.
https://github.com/couchbase/memcached/blob/master/engines/default_engine/items.c#L564

Update the ewouldblock_engine error injection to only inject
CasMismatch for CAS operatons (and not for SET operations) - this
ensures the original unit test for CAS checking
(McdTestappTest.SubdocCASAutoRetry) now correctly tests for this
issue, and will fail without the fix to subdocument.cc.

Change-Id: I67393114110add05807dbb8dc6bdcc7467f4b887
Reviewed-on: http://review.couchbase.org/69736
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-on: http://review.couchbase.org/69781
Well-Formed: buildbot <build@couchbase.com>

show more ...

Revision tags: v4.5.1
40949cc225-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20771: Remove unnecessary defragmenter_test operator overloads

The defragmenter test has it's own operator new/delete overload, to
improve interopability with Valgrind (so Valgrind sa

MB-20771: Remove unnecessary defragmenter_test operator overloads

The defragmenter test has it's own operator new/delete overload, to
improve interopability with Valgrind (so Valgrind saw explicit calls our
malloc / free).

However the global_new_replacement in platform does this anyway now, so
this code is no longer needed.

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

show more ...

b2afaf9502-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20770: Switch memory tracking from {TC,je}malloc to cbmalloc

When using jemalloc, switch the memory tracking from jemalloc to cbmalloc:

* No longer implicitly replace malloc & fr

MB-20770: Switch memory tracking from {TC,je}malloc to cbmalloc

When using jemalloc, switch the memory tracking from jemalloc to cbmalloc:

* No longer implicitly replace malloc & friends with jemalloc, instead rely
on our own cbmalloc calls. Given malloc replacement doesn't work on
Windows, this now allows us to use jemalloc on Windows.
* Remove the jemalloc-specific alloc hooks, and instead just chain down to
cbmalloc's new/delete hooking.

Similary for TCMalloc, switch the meory tracking to cbmalloc. This removes
any dependancy on TCMalloc's hooks.

Change-Id: I7bfd2c27886eb9b4ec84eec06f7e3258db0b781a
Reviewed-on: http://review.couchbase.org/67545
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

8ea6d9b513-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Fix memory_tracking_test_plugin on macOS

On macOS explicitly set the suffix of the memory_tracking_plugin to
'.dylib' so it is correctly loaded by dlopen().

Change-Id:

MB-20586: Fix memory_tracking_test_plugin on macOS

On macOS explicitly set the suffix of the memory_tracking_plugin to
'.dylib' so it is correctly loaded by dlopen().

Change-Id: Ib289e922d75571f5de29ef131fdd94975d3fdc76
Reviewed-on: http://review.couchbase.org/67626
Well-Formed: buildbot <build@couchbase.com>
Tested-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...

1bff071112-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: memcached_testapp: Fix leaks with OpenSSL

If we run GoogleTest in a configuration which doesn't include any
tests, then it never calls the SetUp and TearDown() methods of any

MB-20586: memcached_testapp: Fix leaks with OpenSSL

If we run GoogleTest in a configuration which doesn't include any
tests, then it never calls the SetUp and TearDown() methods of any
testing::Environment objects. This is problematic as we rely on
shutdown_openssl() being called to free all the memory allocated by
OpenSSL - including memory which is allocated on shared library
open. In other words even if we never call initialize_openssl we need
to call shutdown_openssl().

To fix this move the init and shutdown OpenSSL calls to the
constructor / destructor, which /are/ always called.

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

show more ...

aa32718718-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Update memcached to use cb_malloc memory API

For all instances where we control C-style memory allocation, replace
with calls to cb_malloc/cb_realloc etc.

There are a

MB-20586: Update memcached to use cb_malloc memory API

For all instances where we control C-style memory allocation, replace
with calls to cb_malloc/cb_realloc etc.

There are a small number of instances where memory is allocated on our
behalf inside a library function, for example asprintf(). In such
cases we must still use free() to match the (internal) malloc().

Change-Id: I3e93d3a4bc2c8103e7da96ef448df1c226564528
Reviewed-on: http://review.couchbase.org/67087
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

1ad8b88e01-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Add plugin test to memory_tracking_test, remove memalign test

Expand the memory_tracking_test to add a set of tests which verify that
memory allocated in a dlopen'd plugin is c

MB-20586: Add plugin test to memory_tracking_test, remove memalign test

Expand the memory_tracking_test to add a set of tests which verify that
memory allocated in a dlopen'd plugin is correctly tracked.

This is in preparation for the cbmalloc-based tracking where we do not
implicilty get all calls to malloc() (in any library) tracked.

Also remove the memalign tests - we don't actually use memalign in our
codebase, and hence having to support it in the cbmalloc API just for
testcode is unnecessary.

Change-Id: I59a0570c1fb64059cb94dc68f1ded366df2385fc
Reviewed-on: http://review.couchbase.org/67303
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

8e7d72c108-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Use cJSON_Free to free cJSON_Print strings

Any strings created by cJSON_Print() need to use cJSON_Free() to free
it, not free().

Change-Id: Ie62efab4327f8e16dfe1615109

MB-20586: Use cJSON_Free to free cJSON_Print strings

Any strings created by cJSON_Print() need to use cJSON_Free() to free
it, not free().

Change-Id: Ie62efab4327f8e16dfe1615109f789e3c577950a
Reviewed-on: http://review.couchbase.org/67504
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

6dfd758508-Sep-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Fix build break on OS X due to missing strdup header

Change-Id: I7de90b836f1edefe037f2189b416065b50d27d68
Reviewed-on: http://review.couchbase.org/67514
Reviewed-by: Chris

MB-20586: Fix build break on OS X due to missing strdup header

Change-Id: I7de90b836f1edefe037f2189b416065b50d27d68
Reviewed-on: http://review.couchbase.org/67514
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Dave Rigby <daver@couchbase.com>

show more ...

511f7b2226-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20586: Give each alloc_hook implementation its own symbols

Currently the different memory alloc hook implementations all share
the same symbol name (mc_XXX). This means that it is imp

MB-20586: Give each alloc_hook implementation its own symbols

Currently the different memory alloc hook implementations all share
the same symbol name (mc_XXX). This means that it is impossible to
compile more than one alloc hook implementation into a program at the
same time.

While this may seem like a reasonable limitation, for testing how
different hook implementations work it can be useful to have multiple
implemenations available at runtime, and then for example have one
allocator chain to another one.

This patch therefore encapsulates each alloc hook implementation into
a class, each with a set of static methods. The primary Alloc hook set
is given the type alias 'AllocHooks'.

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

show more ...

b02e003925-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20586: darwin_zone: Use correct handle for zone_calloc

Fix a typo in our darwin zone allocator / shim - use the underlying
zone handle when calling into default_zone->calloc().

MB-20586: darwin_zone: Use correct handle for zone_calloc

Fix a typo in our darwin zone allocator / shim - use the underlying
zone handle when calling into default_zone->calloc().

This appears to be a benign issue when the default zone is jemalloc
(as is the standard deployment), but can causes segfaults when using
the system zone allocator.

Change-Id: I4d525a5482766b5a6f5b272cf6f994d00dc9cc35
Reviewed-on: http://review.couchbase.org/67086
Tested-by: buildbot <build@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: David Haikney <david.haikney@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

3185fbb230-Aug-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20625: Initialize EWB_Engine::real_engine_ref

Change-Id: Ib2195ad2e92e8d0a51f783e96838430babb78718
Reviewed-on: http://review.couchbase.org/67160
Well-Formed: buildbot <build@couc

MB-20625: Initialize EWB_Engine::real_engine_ref

Change-Id: Ib2195ad2e92e8d0a51f783e96838430babb78718
Reviewed-on: http://review.couchbase.org/67160
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

805557ff18-Aug-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20549: memcached is too aggressive closing connections

It can't shut down connections in an ewouldblock state as
the underlying connection may call notify_io_complete on
the objec

MB-20549: memcached is too aggressive closing connections

It can't shut down connections in an ewouldblock state as
the underlying connection may call notify_io_complete on
the object at a later time (and then it may no longer
belong to the same session etc).

Change-Id: Ia078fd2b550a869101d755d104747b06244706b8
Reviewed-on: http://review.couchbase.org/66866
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

7cbdba5622-Aug-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20625: Backport test client from spock

This is roughly a cp of the test client from sha
d93edd49e02f9648606532d2790076d4ba6e1e5a, but with minor
tweaks so it works in the watson b

MB-20625: Backport test client from spock

This is roughly a cp of the test client from sha
d93edd49e02f9648606532d2790076d4ba6e1e5a, but with minor
tweaks so it works in the watson branch.

Change-Id: I69814fb67c910ea2837b0c70df0e8eb510a0e8c2
Reviewed-on: http://review.couchbase.org/66951
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...

e2e8d79f22-Aug-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20625: Backport ewouldblock engine from Spock

This is roughly a cp of the ewouldblock engine
from sha d93edd49e02f9648606532d2790076d4ba6e1e5a, but
with minor tweaks so it works i

MB-20625: Backport ewouldblock engine from Spock

This is roughly a cp of the ewouldblock engine
from sha d93edd49e02f9648606532d2790076d4ba6e1e5a, but
with minor tweaks so it works in the watson branch.

Change-Id: I6b2d6f709cd2ddd9bd50e2e271687b8b0755b3ee
Reviewed-on: http://review.couchbase.org/66950
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

ff264ea922-Aug-2016 Dave Rigby <daver@couchbase.com>

MB-20619: OS X 10.12: Change how the default zone is found

On OSX 10.12, malloc_default_zone returns a special zone that is not
present in the list of registered zones. That zone uses a

MB-20619: OS X 10.12: Change how the default zone is found

On OSX 10.12, malloc_default_zone returns a special zone that is not
present in the list of registered zones. That zone uses a "lite zone"
if one is present (apparently enabled when malloc stack logging is
enabled), or the first registered zone otherwise. In practice this
means unless malloc stack logging is enabled, the first registered
zone is the default.

So get the list of zones to get the first one, instead of relying on
malloc_default_zone.

(Based on: https://github.com/jemalloc/jemalloc/pull/427/commits/19c9a3e828ed46f1576521c264640e60bd0cb01f)

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

show more ...

55d16a5f15-Aug-2016 Trond Norbye <trond.norbye@gmail.com>

MB-20475: Fix buffer overrun in ioctl_set

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

MB-20475: Fix buffer overrun in ioctl_set

Change-Id: I157444d2c7aca9ddf3d49a7d5de9854594ddb97e
Reviewed-on: http://review.couchbase.org/66759
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>

show more ...

Revision tags: v4.6.0, v4.5.0, v4.1.1
706d3b1315-Feb-2016 Will Gardner <will.gardner@couchbase.com>

[BP] MB-20224: gtest macro changes

backport of b6bfb09da

Improve parameterised test names

Adds a test name for every parameterised test case. Also
silences warnings int

[BP] MB-20224: gtest macro changes

backport of b6bfb09da

Improve parameterised test names

Adds a test name for every parameterised test case. Also
silences warnings introduced by the feature being added to
Google Test.

Change-Id: Iae14415c549c165a550d79b39df1619e1cac9f9a
Reviewed-on: http://review.couchbase.org/66216
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...

238a7bd217-Jun-2016 Trond Norbye <trond.norbye@gmail.com>

MB-19834: fix sigsegv on CentOS7

The audit destructor (of the global instance) tried to pthread_join
an uninitialized pthread id.

This patch applies the same fix as we've added

MB-19834: fix sigsegv on CentOS7

The audit destructor (of the global instance) tried to pthread_join
an uninitialized pthread id.

This patch applies the same fix as we've added for trunk for
MB-19957 (which was filed when I saw this as infinite hang on
windows)

Change-Id: I2267b47494d975f75174473db9f9964dcafa9794
Reviewed-on: http://review.couchbase.org/65001
Reviewed-by: Dave Rigby <daver@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...

5cdff30c07-Jun-2016 Jim Walker <jim@couchbase.com>

MB-18452: Add a dcp_param type for set_param

The fix for 18452 requires that the new config value can be tweaked
via epctl/set_param at runtime (get-out-of-jail if we got the value
w

MB-18452: Add a dcp_param type for set_param

The fix for 18452 requires that the new config value can be tweaked
via epctl/set_param at runtime (get-out-of-jail if we got the value
wrong).

This patch updates memcached to define a new type for set_parm.

Change-Id: Ifce5a18fc807285471b08e9737cedb5db2b7923f
Reviewed-on: http://review.couchbase.org/64954
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

d84f664b02-Jun-2016 Dave Rigby <daver@couchbase.com>

MB-19748: Add naive DCP producer to EWB_Engine

To allow memcached tests to be written which involve DCP
(e.g. checking that the DCP state machine in memcached is correct), we
need to

MB-19748: Add naive DCP producer to EWB_Engine

To allow memcached tests to be written which involve DCP
(e.g. checking that the DCP state machine in memcached is correct), we
need to have some way of generating DCP mutations. This patch adds
very basic, fake DCP support to ewouldblock_engine. Only three methods
are supported:

* dcp_open - Always returns success.
* dcp_stream_req - Always returns success.
* dcp_step - Always produces a single, fixed DCP_MUTATION message, and
returns ENGINE_WANT_MORE.

While very basic, this is sufficient to allow a client to request a
DCP stream from memcached, and for us to pump infinite DCP mutation
messages to it.

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

show more ...

85bce9c303-Jun-2016 Dave Rigby <daver@couchbase.com>

MB-19748: Forcefully wakeup connections in conn_ship_log with full sendQ

During bucket deletion we attempt to signal any idle clients, so they
can be woken up and the connection closed (

MB-19748: Forcefully wakeup connections in conn_ship_log with full sendQ

During bucket deletion we attempt to signal any idle clients, so they
can be woken up and the connection closed (releasing any resources
etc). To do this we change the libevent mask to enable both read &
write events, the rationale being that they will either wake up if
there's data to be read, or it's possible to write data.

In the case of DCP connections which typically just send requests at
the start and then nothing ever again, we are relying on a write event
to fire to wakeup the connection. However this will only occur if the
connections' sendQ is not full - if it is full then no write event
will fire and the connection will never be closed, resulting in bucket
deletion hanging indefinately (or at least until the client reads some
data and the sendQ becomes non-full).

To fix this we simply "fake" a write event after changing the
mask. This will guarantee that the connection receives an event and is
consequently closed. Note this is safe even if there's no space in the
write buffer:

- We expect to never attempt to write again (we should check
is_bucket_dying immediate close without writing).

- Even if we somehow did attempt to write, the write will simply fail
due to no space, and we already handle this case.

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

show more ...

2205e90308-Jun-2016 Dave Rigby <daver@couchbase.com>

Merge remote-tracking branch 'couchbase/4.5.0' into watson

* couchbase/4.5.0:
MB-19821: Remove mutex from is_bucket_dying() common path

Change-Id: I8f3bc38260547c6b05d525b6611

Merge remote-tracking branch 'couchbase/4.5.0' into watson

* couchbase/4.5.0:
MB-19821: Remove mutex from is_bucket_dying() common path

Change-Id: I8f3bc38260547c6b05d525b661100dcf815479d0

show more ...


3333fbc207-Jun-2016 Dave Rigby <daver@couchbase.com>

MB-19821: Remove mutex from is_bucket_dying() common path

The is_bucket_dying() function is called from a number of places in
the memcached connection statemachine, to check if a bucket

MB-19821: Remove mutex from is_bucket_dying() common path

The is_bucket_dying() function is called from a number of places in
the memcached connection statemachine, to check if a bucket is being
deleted (or memcached shutting down), and hence if the connection
should terminate immediately.

A recent change (MB-19756,
http://review.couchbase.org/#/c/64539/) added an additional place
where we call is_bucket_dying - in the conn_nread state. This has had
a significant performance impact on front-end operations; as
is_bucket_dying needs to acquire a mutex to check the buckets' state;
and this will be contended if multiple front-end threads are
operating.

To address this, modify the Bucket class so an std::atomic variable
can be used intead of having to acquire the mutex. Given the state
field will rarely change this should remove any contention.

Change-Id: I356c2bafd656644c51cfcaa12c6967b9be182345
Reviewed-on: http://review.couchbase.org/64789
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Reviewed-by: Sriram Ganesan <sriram@couchbase.com>

show more ...

12345678910>>...116