History log of /6.6.0/platform/ (Results 1 - 25 of 498)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.5.1
03c5623424-Feb-2020 Dave Rigby <daver@couchbase.com>

MB-38034: Correctly detect '0e5' as a valid JSON number

Numbers in scientific notation with a single zero before the 'e' are
incorrectly considered to be not JSON - e.g. '0e5'.

MB-38034: Correctly detect '0e5' as a valid JSON number

Numbers in scientific notation with a single zero before the 'e' are
incorrectly considered to be not JSON - e.g. '0e5'.

Update to decode table from the latest version of upstream
JSON_checker.c
(https://github.com/douglascrockford/JSON-c/commit/bb3e8d18a33e8335619519e62462c666370e232d)
which fixes this.

Change-Id: I31512375aae5ca13c555b717697319b42d420439
Reviewed-on: http://review.couchbase.org/122783
Well-Formed: Wayne Siu <wayne@couchbase.com>
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

66c0644503-Feb-2020 Dave Rigby <daver@couchbase.com>

MB-37096: NonNegativeCounter: Fix signed/unsigned mismatch

As reported by MSVC:

platform/non_negative_counter.h(127): warning C4018: '>': signed/unsigned mismatch
platfo

MB-37096: NonNegativeCounter: Fix signed/unsigned mismatch

As reported by MSVC:

platform/non_negative_counter.h(127): warning C4018: '>': signed/unsigned mismatch
platform/non_negative_counter.h(116): note: while compiling class template member function 'T
cb::NonNegativeCounter<T,cb::DefaultUnderflowPolicy>::fetch_add(__int64)'
with
[
T=uint64_t
]

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

show more ...

d3e7c4b429-Jan-2020 Dave Rigby <daver@couchbase.com>

MB-37096: Add setupWindowsDebugCRTAssertHandling()

Add a new function to platform - setupWindowsDebugCRTAssertHandling().

If running on Windows with a Debug build, direct error and

MB-37096: Add setupWindowsDebugCRTAssertHandling()

Add a new function to platform - setupWindowsDebugCRTAssertHandling().

If running on Windows with a Debug build, direct error and assertion
messages from the CRT to stderr, in addition to the default GUI
dialog box. Also prints a backtrace to the error.

Ensures that errors from Debug-mode tests etc are visible even if
running in a non-graphical mode (e.g. Jenkins CV job).

No-op on non-Windows, or if not a Debug build.

Change-Id: Ic71e918f8af4ccf6b5dc8d687eb447f43ec75567
Reviewed-on: http://review.couchbase.org/121349
Well-Formed: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

bec44f9606-Dec-2019 Trond Norbye <trond.norbye@gmail.com>

MB-35195: Merge remote-tracking branch 'couchbase/alice'

* couchbase/alice:
MB-35195: cb::io::mkdirp must terminate for non-existent drive

Change-Id: Iab1c23794efe052d67d9d630

MB-35195: Merge remote-tracking branch 'couchbase/alice'

* couchbase/alice:
MB-35195: cb::io::mkdirp must terminate for non-existent drive

Change-Id: Iab1c23794efe052d67d9d630545520563a412532

show more ...


d74d705a06-Nov-2019 Dave Rigby <daver@couchbase.com>

MB-36776: Replace inefficient impl of htonll/ntohll with folly::Endian

platform.so has an implementation of the 64bit byteswap functions
ntohll() and htonll(), for platforms which don't

MB-36776: Replace inefficient impl of htonll/ntohll with folly::Endian

platform.so has an implementation of the 64bit byteswap functions
ntohll() and htonll(), for platforms which don't have that symbol
natively.

Profiling of ep-engine Writer threads highlighed that a large amount
of time (~5%) was being spent in platform's ntohll() / htonll()
functions. This was surprising, as:

a) I had assumed that modern Linux (CentOS 7) provided the 64bit
byteswap functions, and

b) Even if the OS doesn't have those functions, I assumed our
implementation shouldn't be _that_ slow.

(For context the top 10 functions in the profile are below, ntohll is
the 3rd hottest):

Overhead Command Shared Object Symbol
4.82% mc:writer_2 libsnappy.so.1.2.0 [.] snappy::internal::CompressFragment
4.33% mc:writer_2 [kernel.kallsyms] [k] _raw_spin_lock_irq
4.30% mc:writer_2 libplatform_so.so.0.1.0 [.] ntohll
2.82% mc:writer_2 libc-2.17.so [.] __memcpy_ssse3
2.49% mc:writer_2 libsnappy.so.1.2.0 [.] snappy::RawUncompress
2.36% mc:writer_2 [kernel.kallsyms] [k] _raw_spin_lock
1.99% mc:writer_2 libjemalloc.so.2 [.] je_malloc_usable_size
1.74% mc:writer_2 [kernel.kallsyms] [k] __radix_tree_lookup
1.43% mc:writer_2 libjemalloc.so.2 [.] je_malloc

Both my assumptions are actually incorrect:

- CentOS 7 (and other recent distros including Ubuntu 18.04) *don't*
have ntohll / htonll symbols. They *do* have functionally
equivilent function htobe64() since glibc 2.9 (2008), but that's a
different, Linux-specific symbol.

- Our implemenation _is_ slow - it's doing old-style manual byteswap,
which is 10x slower on mancouch than the GCC compiler intrinsic
__builtin_bswap64:

Run on (24 X 2400 MHz CPU s)
2019-11-06 12:20:30
-----------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------
Swap64 57 ns 57 ns 12216131
BuiltinSwap64 5 ns 5 ns 141279127

Given we already have an optimized byteswap implementation available
from Folly, use that instead. Also inline the functions to reduce the
call overhead.

This results in the same performance as the GCC compiler intrinsic
(but is cross-platform):

Run on (24 X 2400 MHz CPU s)
2019-11-06 12:33:05
-----------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------
Swap64 57 ns 57 ns 12507068
FollySwap64 5 ns 5 ns 135655965
BuiltinSwap64 5 ns 5 ns 100000000

Change-Id: I472be7705622b800c9849bfc0615fb49a73ccce8
Reviewed-on: http://review.couchbase.org/117439
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>
Reviewed-by: Richard de Mellow <richard.demellow@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>

show more ...

58590f5521-Oct-2019 Trond Norbye <trond.norbye@gmail.com>

Mark folly as a system directory

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

Mark folly as a system directory

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

show more ...

04c0bc3f21-Oct-2019 Trond Norbye <trond.norbye@gmail.com>

Remove warning: warning: extra ‘;’ [-Wpedantic]

Change-Id: I0144570ea53004e0b89298f2f31412ddfe5b2f6a
Reviewed-on: http://review.couchbase.org/116712
Reviewed-by: Dave Rigby <daver@co

Remove warning: warning: extra ‘;’ [-Wpedantic]

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

show more ...

1f20670108-Oct-2019 Trond Norbye <trond.norbye@gmail.com>

Let cb::compression::Buffer operators be consts

Change-Id: Ie30e3284ff0049e6f7672917f7029c98957fdaa8
Reviewed-on: http://review.couchbase.org/116096
Tested-by: Build Bot <build@couch

Let cb::compression::Buffer operators be consts

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

show more ...

f42ec1e926-Sep-2019 Dave Rigby <daver@couchbase.com>

Allow memory order of AtomicDuration to be specified

Change AtomicDuration to a templated class, templated on the memory
order to use. Defaults to the same memory order it previously use

Allow memory order of AtomicDuration to be specified

Change AtomicDuration to a templated class, templated on the memory
order to use. Defaults to the same memory order it previously used
(relaxed).

Change-Id: I00221d1acbea73f12a00d679e595f91739d998c0
Reviewed-on: http://review.couchbase.org/115575
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Ben Huddleston <ben.huddleston@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...

d2114be801-Oct-2019 Trond Norbye <trond.norbye@gmail.com>

Add cb::compression::Buffer::empty()

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

Add cb::compression::Buffer::empty()

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

show more ...

91143b0928-Aug-2019 Dave Rigby <daver@couchbase.com>

NonNegativeCounter: Enforce invariant on construction

Change NonNegativeCounter to check that the argument passed to the
ctor is also not negative, so we catch attempts to construct an

NonNegativeCounter: Enforce invariant on construction

Change NonNegativeCounter to check that the argument passed to the
ctor is also not negative, so we catch attempts to construct an
invalid NonNegativeCounter.

(This change was motivated by a bug where we constructed a
NonNegativeCounter with a negative value, but didn't identify the
'underflow' until the /next/ time the counter was modified, which made
the bug hard to track down.)

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

show more ...

1d6d6c0308-Aug-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-35630: Use Folly's AccessSpreader to determine cpu in CoreStore

Perf stats from Triton 2 node 80/20 R/W throughput test:
Before: ~3,435,129 ops/s (last 22 runs)
After: ~3,542,453

MB-35630: Use Folly's AccessSpreader to determine cpu in CoreStore

Perf stats from Triton 2 node 80/20 R/W throughput test:
Before: ~3,435,129 ops/s (last 22 runs)
After: ~3,542,453 ops/s (5 runs)

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

show more ...

4ef4977902-Aug-2019 Dave Rigby <daver@couchbase.com>

rwlock_test: Check all mutex combinations

Expand the rwlock TSan tests to check for all combinations of the used
mutexes -

std::mutex
std::shared_timed_mutex

rwlock_test: Check all mutex combinations

Expand the rwlock TSan tests to check for all combinations of the used
mutexes -

std::mutex
std::shared_timed_mutex
folly::SharedMute
cb::RWLock

This includes checking both orders of each pair, given that TSan on
macOS can detect locks in one order but not the other...

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

show more ...

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

17b14c9221-Jun-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-34676: Add byte swap functions to UnsignedNByteInteger

We need to be able to write cb::uint48_t always in big endian order
to CouchStore. Add generic functions to swap the byte order

MB-34676: Add byte swap functions to UnsignedNByteInteger

We need to be able to write cb::uint48_t always in big endian order
to CouchStore. Add generic functions to swap the byte order to
UnsignedNByteInteger as they may be useful elsewhere.

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

show more ...

fd7818a524-Apr-2019 Ben Huddleston <ben.huddleston@couchbase.com>

MB-33846: Make NonNegativeCounter deal with negatives

In the hash table in kv_engine we often add negative values.
This causes the stats to underflow. Correct this by doing similar
l

MB-33846: Make NonNegativeCounter deal with negatives

In the hash table in kv_engine we often add negative values.
This causes the stats to underflow. Correct this by doing similar
logic done in fetch_sub in fetch_add, and allowing fetch_add to
take a signed type. Also, allow fetch_sub to take a negative value
for consistency.

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

show more ...

4fd5c7e907-May-2019 Jim Walker <jim@couchbase.com>

MB-34074: Add missing global new/delete nothrow variants

Issue discovered when using the thread_local keyword on
cento7 (glibc). Found that glibc was performing a nothrow
new in the

MB-34074: Add missing global new/delete nothrow variants

Issue discovered when using the thread_local keyword on
cento7 (glibc). Found that glibc was performing a nothrow
new in the runtime intialisation of the thread_local and
later using a standard delete, this lead to an attempt
to free via jemalloc when the allocation was made by
system allocator.

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

show more ...

cdf833f224-Apr-2019 Richard de Mellow <richard.demellow@couchbase.com>

CBD-2920 Fix compile errors with Xcode 10.2 command line tools

Fix compile errors with Xcode 10.2 command line tools after upgrading to
nlohmann::json v3.5.0.

Also as part of th

CBD-2920 Fix compile errors with Xcode 10.2 command line tools

Fix compile errors with Xcode 10.2 command line tools after upgrading to
nlohmann::json v3.5.0.

Also as part of this move functions that require <sstream> in pipe.h to
a pipe.cc so that we may use nlohmann/json_fwd.hpp.

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

show more ...

4008588f30-Apr-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Correctly mark breakpad headers as system

In addition to that we don't need to add that directory
and #define to all of the targets in platform.

Change-Id: I60b8fe13c8f

Cleanup: Correctly mark breakpad headers as system

In addition to that we don't need to add that directory
and #define to all of the targets in platform.

Change-Id: I60b8fe13c8ff5ce4846d4ee6f3b7d2f153a649e4
Reviewed-on: http://review.couchbase.org/108439
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@couchbase.com>

show more ...

5441ba9405-Apr-2019 Dave Rigby <daver@couchbase.com>

Add rwlock / ThreadSanitzer interoperability tests

Add tests which check that, for each of the different mutex types we
use, ThreadSanizier can correctly detect locking issues.

Add rwlock / ThreadSanitzer interoperability tests

Add tests which check that, for each of the different mutex types we
use, ThreadSanizier can correctly detect locking issues.

Note this test suite relies on:

a) ThreadSanitizer being enabled, and
b) ThreadSanitizer specifically configured to immediately halt on any
errors.

Moreover, it turns out that macOS (Mojave, XCode 10.1) _doesn't_ have
the necessary mutex annotations for std::mutex, std::shared_mutex or
pthread_rwlock, which means those test combinations fail on macOS and
need to be skipped.

Change-Id: I2cb96e6dde95db4158bb8cf4536e6d637a0723a7
Reviewed-on: http://review.couchbase.org/107361
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...

8c74fe5e25-Mar-2019 Richard de Mellow <richard.demellow@couchbase.com>

MB-22005: Make MicrosecondStopwatch templated

Make MicrosecondStopwatch templated so it can be used with
HdrHistogram

Change-Id: Ied31358b31cf97f121a8af8773f9def9685fb047
Re

MB-22005: Make MicrosecondStopwatch templated

Make MicrosecondStopwatch templated so it can be used with
HdrHistogram

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

show more ...

becffd3b29-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9

Cleanup: Remove __sun and __FreeBSD__ code

We don't build on those platforms and we have no idea of
the current status.

Change-Id: Ifa752904f7c69c7d4fa188deb223e4aabed23fa9
Reviewed-on: http://review.couchbase.org/106994
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>

show more ...

994b855029-Mar-2019 Dave Rigby <daver@couchbase.com>

Merge remote-tracking branch 'couchbase/alice'

* couchbase/alice:
MB-33351: Don't throw in CoreStore.get()

Change-Id: I826c928bee1635f785dcbd95d8bdbd81ac03dc28


079961ee27-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

MB-33327: Add support for software-only CRC32

If the target CPU isn't X86 don't try to use HW assisted functions

Change-Id: If1c021e97fde5842b158aca7ed886de7d0434b89
Reviewed-on

MB-33327: Add support for software-only CRC32

If the target CPU isn't X86 don't try to use HW assisted functions

Change-Id: If1c021e97fde5842b158aca7ed886de7d0434b89
Reviewed-on: http://review.couchbase.org/106855
Tested-by: Trond Norbye <trond.norbye@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...

87c134a827-Mar-2019 Trond Norbye <trond.norbye@gmail.com>

Cleanup: Don't build crc files multiple times

As a preparation for MB-33327 don't build the CRC32 related
source files more than once. Link and use the versions in
platform instead.

Cleanup: Don't build crc files multiple times

As a preparation for MB-33327 don't build the CRC32 related
source files more than once. Link and use the versions in
platform instead.

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

show more ...

12345678910>>...20