History log of /6.0.3/platform/include/ (Results 1 - 25 of 260)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3, 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
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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

255b68ab16-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

Add cb::io::loadFile()

Reading a file is a common task used around in our system.
Might as well have helper method for that to avoid
reimplement it everywhere.

Change-Id: I8

Add cb::io::loadFile()

Reading a file is a common task used around in our system.
Might as well have helper method for that to avoid
reimplement it everywhere.

Change-Id: I829d11b2a2dbffe168acb28a325563ff0fb59ca0
Reviewed-on: http://review.couchbase.org/91104
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

5c6a39bc15-Mar-2018 Dave Rigby <daver@couchbase.com>

MB-28714: Use CMake-generated visibility header

During testing of KV-Engine under UndefinedBehaviourSanitizer; it was
noted that platform's external (exported) symbols do not have the

MB-28714: Use CMake-generated visibility header

During testing of KV-Engine under UndefinedBehaviourSanitizer; it was
noted that platform's external (exported) symbols do not have the
correct macro definition when importing the symbol.

Specifically, the PLATFORM_PUBLIC_API macro expands to nothing when
linking against platform; where instead it should expand to
(assuming Linux / macOS):

#define PLATFORM_PUBLIC_API _attribute_((visibility(default)))

This causes issues with RTTI and dynamic cast - there ends up being
multiple typeinfo symbols for the same class; meaning RTTI comparisons
fail - for example:

$ nm -mo memcached-get-set-tests ep.dylib ../platform/libplatform_so.dylib | c++filt|grep "typeinfo for cb::ProcessClockSource"
memcached-get-set-tests: 0000000100ab4040 (__DATA,__data) non-external (was signed char private external) typeinfo for cb::ProcessClockSource
../platform/libplatform_so.dylib: 000000000008cc20 (__DATA,__data) weak external typeinfo for cb::ProcessClockSource

Note how there's both a non-external and weak, external typeinfo for
this symbol.

To address this, remove our custom visibility header and use the
standard CMake-generated header - which does define the macro
correclty in the import case.

Change-Id: Iec9544884d9333ad9fe4ba53e88cd02d4b8dbe6d
Reviewed-on: http://review.couchbase.org/91014
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

f4e59c8214-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

Add getsockname and getpeername to cbsocket

Get the textual representation of a socket and its peer

Change-Id: I1080057322fb7209560be1057c6d484d2c47e5fc
Reviewed-on: http://revi

Add getsockname and getpeername to cbsocket

Get the textual representation of a socket and its peer

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

show more ...

0f8ec9fb09-Mar-2018 Tim Bradgate <tim.bradgate@couchbase.com>

MB-27661 [Refactor]: Change signature of cb::net::connect

Due to Windows, change the signature of cb::net::connect to take
a size_t as the name length argument, and then narrow this on U

MB-27661 [Refactor]: Change signature of cb::net::connect

Due to Windows, change the signature of cb::net::connect to take
a size_t as the name length argument, and then narrow this on Unix
for the ::connect call.

Change-Id: Ieec5800dcfdf9923e299dd97e30dd7c408bc5f34
Reviewed-on: http://review.couchbase.org/90747
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

a415610809-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

Remove C interface to cbsocket

Our code should be C++

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

Remove C interface to cbsocket

Our code should be C++

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

show more ...

341d07b509-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

Drop logging functionality from cbsocket

This leaves the library as a pure wrapping to BSD sockets so
that we have a "stable" API we may use on all platforms without
having to #ifdef

Drop logging functionality from cbsocket

This leaves the library as a pure wrapping to BSD sockets so
that we have a "stable" API we may use on all platforms without
having to #ifdef parameters to the varius functions all over the
place

Change-Id: I89be0dcfa8b355bccdbc77a188a301500d049467
Reviewed-on: http://review.couchbase.org/90720
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

7143ab1f06-Mar-2018 Trond Norbye <trond.norbye@gmail.com>

Add helper string to allow add std::string to cJSON

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

Add helper string to allow add std::string to cJSON

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

show more ...

aa5e5d7f05-Mar-2018 Jim Walker <jim@couchbase.com>

MB-28453: Add const data() method to compression::Buffer

Required in another commit

Change-Id: I4f7fcd29c6d1c4587afaa424c9a555e9896395be
Reviewed-on: http://review.couchbase.org

MB-28453: Add const data() method to compression::Buffer

Required in another commit

Change-Id: I4f7fcd29c6d1c4587afaa424c9a555e9896395be
Reviewed-on: http://review.couchbase.org/90430
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

da5130e626-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Refactor: Split cJSON_Number into cJSON_Double

We barely use the double part in our code, so it's easier to
jet cJSON_Number mean a signed integer, and cJSON_Double
represent floatin

Refactor: Split cJSON_Number into cJSON_Double

We barely use the double part in our code, so it's easier to
jet cJSON_Number mean a signed integer, and cJSON_Double
represent floating points.

This means that we can use signed 64 integers without caring
about information loss (except for signness issues, but that
require deeper changes to cJSON)

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

show more ...

1234567891011