History log of /6.0.3/platform/ (Results 1 - 25 of 409)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3
de77d52719-Jul-2019 Trond Norbye <trond.norbye@gmail.com>

MB-35195: cb::io::mkdirp must terminate for non-existent drive

cb::io::mkdirp use recursion and tries to create the parent
directory, but if the directory is a drive mapping for windows

MB-35195: cb::io::mkdirp must terminate for non-existent drive

cb::io::mkdirp use recursion and tries to create the parent
directory, but if the directory is a drive mapping for windows
we'll return '.' (which means the current directory) and
returns true. Then we're back up in the recursion and try
to create the directory, which would fail again and try
the parent directory (.) and we enter an endless loop.

Solution:
Use SHCreateDirectoryEx instead.

Change-Id: I8356f26248ff20bb890ad4d78824f052438cb702
Reviewed-on: http://review.couchbase.org/112261
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

2e95f4b325-Mar-2019 Dave Rigby <daver@couchbase.com>

MB-33351: Merge branch 'vulcan' into alice

* vulcan:
MB-33351: Don't throw in CoreStore.get()

Change-Id: Ia27c6835dae2f6a40881a3f6c6626c9a859d1950


Revision tags: v5.5.4
e379ad7619-Mar-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-33351: Don't throw in CoreStore.get()

As we call CoreStore.get() from within the new and delete operators,
we cannot call new or throw anything from inside this function.
Calling

MB-33351: Don't throw in CoreStore.get()

As we call CoreStore.get() from within the new and delete operators,
we cannot call new or throw anything from inside this function.
Calling new would result in a recursive call via the new operator;
this would result in a stack overflow if we were calling new to create
and exception message, in the case where we would throw if our index
is out of range. Throwing from within a delete call would violate
noexcept on linux which results in a std::terminate.

Fix these issues by ensuring we always return something valid from
CoreStore.get(). In this case, something belonging to another core.
We'll get some cache contention, but this is better than crashing.

Change-Id: I56968d46215641787c1d01337c8dea619da0ffc3
Reviewed-on: http://review.couchbase.org/106491
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Tested-by: David Haikney <david.haikney@couchbase.com>

show more ...

Revision tags: v5.5.0
2fbe517901-Jun-2018 Chris Hillery <ceej@couchbase.com>

MB-27060: Don't ship dbghelp.dll

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

MB-27060: Don't ship dbghelp.dll

Change-Id: Ib37e3987a6f2dcd56f8c11088ea8d645d92e882c
Reviewed-on: http://review.couchbase.org/95005
Tested-by: Chris Hillery <ceej@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Chris Hillery <ceej@couchbase.com>

show more ...

4002166922-May-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29558: Add further information to Pipe::produced()

Add write_head, buffer.size() and nbytes to the error message

Change-Id: I930e05cee6ff5a2b069a7116d80b30bde85baffb
Reviewed

MB-29558: Add further information to Pipe::produced()

Add write_head, buffer.size() and nbytes to the error message

Change-Id: I930e05cee6ff5a2b069a7116d80b30bde85baffb
Reviewed-on: http://review.couchbase.org/94517
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

1e35113816-May-2018 Sundar Sridharan <sundar.sridharan@gmail.com>

Make cbsocket library building optional

For non-couchbase server builds that do not need cbsocket
it would be ok to skip building it.
For Couchbase Server builds this would make no d

Make cbsocket library building optional

For non-couchbase server builds that do not need cbsocket
it would be ok to skip building it.
For Couchbase Server builds this would make no difference
as it is ON by default.

Change-Id: Ib7d8f446454cd91da2d929541aa62b23dc1aa37a
Reviewed-on: http://review.couchbase.org/94308
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sundar Sridharan <sundar@couchbase.com>

show more ...

47a945ae14-May-2018 Dave Rigby <daver@couchbase.com>

socket.h: Define in_port_t for non-Windows

We already define in_port_t for WIN32 in platform/socket.h; also make
it available (via netinet/in.h) for non-WIN32 to make using in_port_t

socket.h: Define in_port_t for non-Windows

We already define in_port_t for WIN32 in platform/socket.h; also make
it available (via netinet/in.h) for non-WIN32 to make using in_port_t
consistent between platforms.

Change-Id: I18ab9fd5cbb338ffc88b4dc147363b5ac79289ec
Reviewed-on: http://review.couchbase.org/94129
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

aabde79708-May-2018 Trond Norbye <trond.norbye@gmail.com>

Reference all of getopt members with full namespace

Change-Id: Ibd04c3c20acc72b3c521d367b6b6b0da49bbe716
Reviewed-on: http://review.couchbase.org/93882
Reviewed-by: Dave Rigby <daver

Reference all of getopt members with full namespace

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

show more ...

e8521d7304-May-2018 Trond Norbye <trond.norbye@gmail.com>

Use PLATFORM_PUBLIC_API instead of __declspec()

Change-Id: Iab8de18d62347a3e716c915ba2e4657081119d19
Reviewed-on: http://review.couchbase.org/93777
Tested-by: Build Bot <build@couchb

Use PLATFORM_PUBLIC_API instead of __declspec()

Change-Id: Iab8de18d62347a3e716c915ba2e4657081119d19
Reviewed-on: http://review.couchbase.org/93777
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...

38010ba304-May-2018 Trond Norbye <trond.norbye@gmail.com>

MB-29521: Allow long options with values in getopt_long

getopt_long did not work for --argument=value (or --argument value)

In addition to that optional argument did not work

MB-29521: Allow long options with values in getopt_long

getopt_long did not work for --argument=value (or --argument value)

In addition to that optional argument did not work

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

show more ...

d912dd2b04-May-2018 Dave Rigby <daver@couchbase.com>

UBSan: Fix failing RTTI checks when using DSOs

UBSan's vptr checker needs to be able to lookup RTTI information
(type_info) for all calls via virtual functions. However, a number of

UBSan: Fix failing RTTI checks when using DSOs

UBSan's vptr checker needs to be able to lookup RTTI information
(type_info) for all calls via virtual functions. However, a number of
tests which load DSOs (via dlopen) currently fail when run under
UBSan.

For example:

build-ubsan/kv_engine/engine_testapp -C 0 -E build-ubsan/kv_engine/ep.so -T build-ubsan/kv_engine/ep_testsuite.so -v -e dbname=./ep_testsuite.value_eviction.db

runtime error: member call on address 0x7fffee10e460 which does not point to an object of type 'FileOpsInterface'
0x7fffee10e460: note: object is of type 'StatsOps'
00 00 00 00 a8 64 d8 ef ff 7f 00 00 a0 f9 06 ee ff 7f 00 00 c0 8f 83 f3 ff 7f 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'StatsOps'
#0 0x7ffff35bc970 in BufferedFileOps::constructor(couchstore_error_info_t*, FileOpsInterface*, buffered_file_ops_params) couchstore/src/iobuffer.cc:334

The reason for this is that cb_dlopen() calls dlopen with the
RTLD_LOCAL flag; this means that symbols in the opened DSO are not
made available to the calling binary, or any other loaded
DSOs. Specifically, in the case of ep_testsuite it loads ep.so via
cb_dlopen(); and this includes type info for a number of
storage-related classes such as StatsFileOps.

To solve this, replace RTLD_LOCAL with RTLD_GLOBAL; so all external
symbols in ep.so are accessible.

Change-Id: Ibcc0082998fad492b6f9871d4b3581bb837ef56a
Reviewed-on: http://review.couchbase.org/93760
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

56295be604-May-2018 Trond Norbye <trond.norbye@gmail.com>

Move getopt tests to gtest

Makes it easier to look run the tests and look at the
test failures

Change-Id: Iaee0941e98cc24ebe9b82dd47975e1f1c055ae8e
Reviewed-on: http://revie

Move getopt tests to gtest

Makes it easier to look run the tests and look at the
test failures

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

show more ...

cc62f3a204-May-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in product

Refactor: make our getopt impl available as cb::getopt

This makes it easier to run the unit tests on all platforms
to fix bugs (Note that it is still only used on windows
"in production")

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

show more ...

e40463a503-May-2018 Trond Norbye <trond.norbye@gmail.com>

Include missing cmake include CheckIncludeFile

The missing include cause failures on some platforms (I spottet
it on my Windows machine) with some versions of CMake. Given
that we us

Include missing cmake include CheckIncludeFile

The missing include cause failures on some platforms (I spottet
it on my Windows machine) with some versions of CMake. Given
that we use that function we should include the include file
anyway.

Change-Id: I17b2ef90c5ea0de714bce39219e26d903e8913ed
Reviewed-on: http://review.couchbase.org/93680
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...

Revision tags: v4.6.5, v5.0.0
72cbf62f20-Jun-2017 Will Gardner <willg@rdner.io>

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works different

Add platform abstraction for registering SIGINT signal handlers

Cross-platform compatible support for SIGINT handling is non-trivial
since the cross-platform `signal` API works differently on different
platforms.

This patch introduces two functions to the platform API:
cb::set_sigint_handler and cb::clear_sigint_handler.

On Unix platforms this just uses the sigaction API. On Windows
this uses the ConsoleCtrlHandler API.

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

show more ...

e74188b212-Apr-2018 Gerrit Code Review <gerrit@li94-158.members.linode.com>

Merge "Merge couchbase/spock into couchbase/master"


7d934df011-Apr-2018 Jim Walker <jim@couchbase.com>

Merge couchbase/spock into couchbase/master

* couchbase/spock:
MB-29119: N-byte integer class

Change-Id: I53d59d144e87b0c41e97804db8eaf9b98ad63126


27a0140910-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the tempor

MB-28941: ScopeTimer: Fix bug where start() called on temporary object

When ScopeTimer is constructed and calls start() on all listeners, it
was incorrectly calling start() on the temporary (moved from)
object. This caused problems when used in ep-engine, as
TracerStopwatch::start() recorded the spanId the of the selected
Span. As a consequence, when stop() was later called it still had the
default-constructed value of spanId; and hence TracerStopwatch::stop()
recorded the end time into the wrong Span.

Fix by calling start() on the non-temporary member; add testcase.

Change-Id: Id7aa6a3182aeb695c175d0ae5e92bcc1022cc5b9
Reviewed-on: http://review.couchbase.org/92513
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

4abe0d4b05-Apr-2018 Jim Walker <jim@couchbase.com>

MB-29119: N-byte integer class

Add a class which manages an n-byte integer. The class is intended for
use in the referenced MB as a 48-bit counter.

The class can only support 3/

MB-29119: N-byte integer class

Add a class which manages an n-byte integer. The class is intended for
use in the referenced MB as a 48-bit counter.

The class can only support 3/5/6 or 7 bytes and is not atomic.

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

show more ...

1ebd782809-Apr-2018 Dave Rigby <daver@couchbase.com>

GTest: Fix signed/unsigned comparision warnings

Change-Id: Ie1387f474088f4de329f0530e968e891a5dc311b
Reviewed-on: http://review.couchbase.org/92415
Tested-by: Build Bot <build@couchb

GTest: Fix signed/unsigned comparision warnings

Change-Id: Ie1387f474088f4de329f0530e968e891a5dc311b
Reviewed-on: http://review.couchbase.org/92415
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...

9c83cef106-Apr-2018 Dave Rigby <daver@couchbase.com>

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sectio

MB-28941: Add ScopeTimer classes for timing to multiple listeners

Add ScopeTimer classes: these are timer wrappers which provides a
RAII-style mechanism for timing the duration of sections of code;
where multiple listeners can record the same duration.

The motiviation for this class is we have regions of code which
multiple listeners want to time - for example the main KV-Engine
functions want to record their duratin in a per-bucket histogram, and
also into the per-Cookie Tracer timings. We don't want to just have
each listener perform it's reading of the clock as that is (a) costly
and (b) gives slightly different time values to each
listener. Instead, this class handles reading the time (just once at
start and stop); and then passes it onto each listener.

Change-Id: I50f87a99ce74fadb61931f1b44011e42207c5020
Reviewed-on: http://review.couchbase.org/92322
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

c888d66005-Apr-2018 Sriram Ganesan <sriram@couchbase.com>

MB-28631: Support get_uncompressed_length API

Add an API to get the uncompressed length of a compressed
value

Change-Id: I85f10e6eef5d3ffd434b214c27dc2293f509dac2
Reviewed-o

MB-28631: Support get_uncompressed_length API

Add an API to get the uncompressed length of a compressed
value

Change-Id: I85f10e6eef5d3ffd434b214c27dc2293f509dac2
Reviewed-on: http://review.couchbase.org/91923
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...

d9f78f5304-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29094: Revert change of visiblity to value in RelaxedAtomic

Change-Id: Id0399360e0b035deca02a3e3e9d37cb98ea247b2
Reviewed-on: http://review.couchbase.org/92119
Tested-by: Build Bo

MB-29094: Revert change of visiblity to value in RelaxedAtomic

Change-Id: Id0399360e0b035deca02a3e3e9d37cb98ea247b2
Reviewed-on: http://review.couchbase.org/92119
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>

show more ...

8b9a714b04-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29094: Add implementations for setAdd and setSub to RelaxedAtomic

As shown below, not all base classes have the ability to use the operator
overload methods (+= etc). This patch adds

MB-29094: Add implementations for setAdd and setSub to RelaxedAtomic

As shown below, not all base classes have the ability to use the operator
overload methods (+= etc). This patch adds functional equivalencies to
these which allows for the same behaviour but implemented using the
compare_exchange behaviour of std::atomic.

In file included from /kv_engine/daemon/connection.cc:18:
In file included from /kv_engine/daemon/connection.h:24:
In file included from /kv_engine/daemon/settings.h:31:
/platform/include/relaxed_atomic.h:55:26: error: no member named 'fetch_add' in 'std::__1::atomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >'
return value.fetch_add(arg, std::memory_order_relaxed);
~~~~~ ^
/platform/include/relaxed_atomic.h:68:13: note: in instantiation of member function 'Couchbase::RelaxedAtomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >::fetch_add' requested here
fetch_add(rhs);
^
/kv_engine/daemon/connection.cc:569:20: note: in instantiation of member function 'Couchbase::RelaxedAtomic<std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000> > >::operator+=' requested here
total_cpu_time += ns;
^
1 error generated.

Change-Id: I54fdfd9326e5b771c02554f50ef4f1fda1392db5
Reviewed-on: http://review.couchbase.org/92112
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

7a9658f803-Apr-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-29045: Add setIfSmaller functions to RelaxedAtomic

Change-Id: Ib69d16892acda83c1fa00b7f25e444d7718721b4
Reviewed-on: http://review.couchbase.org/92050
Reviewed-by: Dave Rigby <dav

MB-29045: Add setIfSmaller functions to RelaxedAtomic

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

show more ...

12345678910>>...17