History log of /5.5.2/couchstore/CMakeLists.txt (Results 1 - 25 of 80)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.0.3, v5.5.3, v5.1.2
# c4656abc 04-Apr-2018 Aman Achpal <aman.achpal@couchbase.com>

MB-19768 [View Engine] Fix exit path in Native C code

View Engine C code can exit in two ways:
1) When it finishes processing
2) When Erlang sends an "exit" signal
This patch enf

MB-19768 [View Engine] Fix exit path in Native C code

View Engine C code can exit in two ways:
1) When it finishes processing
2) When Erlang sends an "exit" signal
This patch enforces free-up of conditional variables
before destruction of threads in the latter case, and
synchronizes thread exits to prevent double free-ing.

Change-Id: I9b5f55ca580eb0a93dbb720639e4f6fc72ccc88c
Reviewed-on: http://review.couchbase.org/92115
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Harsha H S

show more ...


# aca76c86 14-Mar-2018 Dave Rigby <daver@couchbase.com>

MB-28668: Use CMake-generated visibility header

During testing of couchstore / KV-Engine under
UndefinedBehaviourSanitizer; it was noted that couchstore's external
(exported) symbols

MB-28668: Use CMake-generated visibility header

During testing of couchstore / KV-Engine under
UndefinedBehaviourSanitizer; it was noted that couchstore's external
(exported) symbols do not have the correct macro definition when
importing the symbol - for example when building KV-Engine's
CouchKVStore class.

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

#define LIBCOUCHSTORE_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 ./ep-engine_ep_unit_tests ../couchstore/libcouchstore.dylib | c++filt|grep "typeinfo for FileOpsInterface"
./ep-engine_ep_unit_tests: 000000010171dd60 (__DATA,__data) non-external (was signed char private external) typeinfo for FileOpsInterface
../couchstore/libcouchstore.dylib: 00000000000af840 (__DATA,__data) weak external typeinfo for FileOpsInterface

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: Id1efe289f082f06ef40d8866fcb507c43e21361f
Reviewed-on: http://review.couchbase.org/90922
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# fab83949 28-Nov-2017 Trond Norbye <trond.norbye@gmail.com>

Refactor: Use compression through cbcompress

Use cbcompress to deal with compression / decompression instead
of using snappy directly (By doing so we may utilize different
compressio

Refactor: Use compression through cbcompress

Use cbcompress to deal with compression / decompression instead
of using snappy directly (By doing so we may utilize different
compression algorithms in the future)

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

show more ...


Revision tags: v5.1.0, v5.0.0
# 5525660b 07-Aug-2017 Dave Rigby <daver@couchbase.com>

dbdump: Add --map mode to print map of couchstore files

Add a new mode: --map which can print a visual representation of a
couchstore file, marking what type of data (Empty, Header, 3 di

dbdump: Add --map mode to print map of couchstore files

Add a new mode: --map which can print a visual representation of a
couchstore file, marking what type of data (Empty, Header, 3 different
B-Trees, Document) each block of the file contains.

Example output
--------------

$ couch_dbdump --map 0.couch.1
Dumping "0.couch.1":

0 ....................................................dddddddddddd
4096 dddddddddddddddddDDDDDdddddddddddddddddd..................tTTTTT
8192 tTTTTTt.................tTTTTTtTTTTt............................
12288 ................................................................
16384 .dddddddddddddddddddDDDDDddddddddddddddddddddddddddddTTTTTTTTTTT
20480 tTTTTTTTTtTtTTTTTtTTTTtTTTTtTt..................................
24576 .tTt............................................................
28672 hh

. Unoccupied
h h File header
t t B-Tree (by-sequence)
t t B-Tree (by-id)
t t B-Tree (local)
d d Document
lowercase: partial block occupied
Uppercase: whole block occupied.
Shaded background - historic (old) data.

This shows a couchstore file initially created with 100 keys, then 50
of those keys were re-written. Created with:

couch_create -k 100 --vbc 1 && couch_create -k 50 --vbc 1 -r

As show in the key, each block type has a different symbol. Capital
letters are used when the block is whole - i.e. every byte in that
block is of the given type. Lowercase letters are used when the block
is partial - i.e. the remaininder of the block is either empty of the
block is shared with some other type.

Note that --iterate-headers can be used with the --map mode, to walk
over previous headers and show old (historic) data. In that case the
old data is shaded gray.

Implementation
--------------

The map is built by instructing couchstore to traverse all trees and
read all documents, and then recording the ranges of the file which
are accessed. To do this a new FileOps subclass - TrackingFileOps is
created, which interposes between the underlying OS FileOps and
couchstore. All calls are passed onto the underlying OS, however in
the case of read() calls the offset and size of the read is recorded.
This allows a binary (read/not-read) map of the entire file to be
generated.

To track the different types of data accessed, a new (optional) method
to FileOpsInterface is added - tag(). This allows couchstore's file
access code to be modestly annotated to indicate when different types
of data (BTree, Document, etc) are about to be read. TrackingFileOps
implements this method which allows a simple state-machine to be built
up inside TrackingFileOps - what's the current datatype and B-Tree
type which subsequent reads correspond to.

Appendix: Color example output
------------------------------

Color view of the output; assuming the commit is viewed on an ANSI
terminal otherwise it'll just look garbage ;)

Dumping "0.couch.1":

0 ....................................................dddddddddddd
4096 dddddddddddddddddDDDDDdddddddddddddddddd..................tTTTTT
8192 tTTTTTt.................tTTTTTtTTTTt............................
12288 ................................................................
16384 .dddddddddddddddddddDDDDDddddddddddddddddddddddddddddTTTTTTTTTTT
20480 tTTTTTTTTtTtTTTTTtTTTTtTTTTtTt..................................
24576 .tTt............................................................
28672 hh

. Unoccupied
h h File header
t t B-Tree (by-sequence)
t t B-Tree (by-id)
t t B-Tree (local)
d d Document
lowercase: partial block occupied
Uppercase: whole block occupied.
Shaded background - historic (old) data.

Change-Id: Idec3729499049ee7e34ff3ba3f128595356618cd
Reviewed-on: http://review.couchbase.org/81997
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Will Gardner <willg@rdner.io>

show more ...


# 30b18fb0 08-Jun-2017 Jim Walker <jim@couchbase.com>

couch_create: A tool for generating ep-engine compatible couch files

Useful for pre-creating a test data set which you then warmup with.

Check usage() for help

Change-Id: I

couch_create: A tool for generating ep-engine compatible couch files

Useful for pre-creating a test data set which you then warmup with.

Check usage() for help

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

show more ...


# 7399e8cf 17-May-2017 Sriram Ganesan <sriram@couchbase.com>

MB-23763: Cleanup resources held by ICU

(i) Every ucol_open needs to have a corresponding ucol_close
(ii) Invoke u_cleanup on process exit in order to release
all resources

MB-23763: Cleanup resources held by ICU

(i) Every ucol_open needs to have a corresponding ucol_close
(ii) Invoke u_cleanup on process exit in order to release
all resources held by ICU
(iii) Every ucnv_open needs to have a corresponding ucnv_close

Change-Id: I0fa2c6e58cedd00b2c91c9ff3eb17f7a3b4a8e8d
Reviewed-on: http://review.couchbase.org/78265
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
Reviewed-by: Sriram Ganesan <sriram@couchbase.com>

show more ...


# ec877c45 16-May-2017 Dave Rigby <daver@couchbase.com>

MB-22602: Use $KVEngineAPI to locate memcached headers; depend on xattr

Use the KVEngineAPI_SOURCE_DIR/BINARY_DIR variable instead of hardcoding
'memcached/', and add the missing dependa

MB-22602: Use $KVEngineAPI to locate memcached headers; depend on xattr

Use the KVEngineAPI_SOURCE_DIR/BINARY_DIR variable instead of hardcoding
'memcached/', and add the missing dependancy on xattr/visibility.h

Change-Id: I9e0b78f81816b09dc86d6924b2dfe495be6d3fe1
Reviewed-on: http://review.couchbase.org/78467
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>

show more ...


# 1edc19a9 24-Apr-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-23554: Add database consistency check tool

* Added 'couch_dbck' tool, which migrates as many documents as
possible from a corrupted file to a new recovered file.

* There is a

MB-23554: Add database consistency check tool

* Added 'couch_dbck' tool, which migrates as many documents as
possible from a corrupted file to a new recovered file.

* There is a 'stale' mode; once a document is corrupted, the tool
rewinds DB header and recovers the old version of the document if
exists. In some cases it is better than losing the document.

* Right now only basic features are implemented. The others will be
added gradually.

* To do:
1) Display corrupted B+tree node info.
2) If seq-tree is corrupted, re-try using ID-tree that might not be
corrupted.
3) Diagnosis mode: check whether or not the DB file is corrupted,
without recovering it.

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

show more ...


# ff146fae 09-Mar-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

CBCS-2: Add latency collector for Couchstore APIs

* Based on platform/Histogram and GenericBlockTimer.

* The collector will be completely bypassed unless it is explicitly
initia

CBCS-2: Add latency collector for Couchstore APIs

* Based on platform/Histogram and GenericBlockTimer.

* The collector will be completely bypassed unless it is explicitly
initiated by outside client.

* Example code in Couchstore side: add below stmt at the beginning
of arbitrary function to collect latency.

...
#include "couch_latency_internal.h"
...
void func1(...) {
COLLECT_LATENCY();
...
}

* Example code in client side:
...
#include <libcouchstore/couch_latency.h>
...
couchstore_latency_collector_start();
... do something with Couchstore ...
couchstore_latency_collector_stop();

* Collected latency info can be dumped using callback function given
by client.

* More features will be added later.

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

show more ...


# 7312d627 27-Feb-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

CBCS-4, MB-19995: Add a hash index for lookup of read buffers

* Current IO buffer lookup implementation is based on linear scanning
of LRU list, which will be very inefficient if buffer

CBCS-4, MB-19995: Add a hash index for lookup of read buffers

* Current IO buffer lookup implementation is based on linear scanning
of LRU list, which will be very inefficient if buffer count increases.
To avoid this issue, added supplemental hash table that can easily find
requested offset in O(1).

* Replaced LRU list with boost intrusive list container.

* Eliminated C-style allocations for buffer instances and used
unique_ptr to avoid unintended memory leak or dangling pointers.
Now `readMap` owns all read buffers.

* Non-DGM read throughput comparison:
Buffers Hashing Baseline
16 121180.27 124158.26
32 121803.32 116882.49
64 123452.57 104240.64
128 126257.26 87375.06
256 128643.78 55951.98
512 131274.29 33370.91

* Note that above numbers were estimated under the environment that
can maximize the impact of hashing (Non-DGM, long-lived handles). The
performance gap will become smaller in real use cases.

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

show more ...


# 0a34f4b2 15-Feb-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

[Refactor]: Rename C files that including internal.h

* To support C++ features in internal.h, all *.c files that depend
on internal.h should be renamed to *.cc.

* Fixed a number

[Refactor]: Rename C files that including internal.h

* To support C++ features in internal.h, all *.c files that depend
on internal.h should be renamed to *.cc.

* Fixed a number of errors and warnings that newly reported by C++
compiler, such as name mangling and type casting.

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

show more ...


# 19cd7c02 26-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

MB-22168: Make couch_dbump xattr aware

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

MB-22168: Make couch_dbump xattr aware

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

show more ...


# 29762990 26-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Don't try to inflate document bodies twice

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

Don't try to inflate document bodies twice

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

show more ...


# 9995e2f1 26-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Print out the decoded datatype bits

Ex: datatype: 0x05 (json,xattr)

Change-Id: I49c638aec01f5012e57f05cb15a730ecc72b9933
Reviewed-on: http://review.couchbase.org/72509
Teste

Print out the decoded datatype bits

Ex: datatype: 0x05 (json,xattr)

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

show more ...


# 8f4791cd 11-Jan-2017 Trond Norbye <trond.norbye@gmail.com>

Refactor: use cbcompress for couch_dbdump

It hides away the details of interacting with snappy and
allocating / releasing temporary buffers.

Change-Id: I8a3374df231f3a86eb293984

Refactor: use cbcompress for couch_dbdump

It hides away the details of interacting with snappy and
allocating / releasing temporary buffers.

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

show more ...


Revision tags: v4.6.0, v4.6.0-DP, v4.5.1-MP1
# 1f655e5e 26-Jul-2016 harsha <hhs.couchbase@gmail.com>

MB-20285 Revert startup snapshot blob which hampers performance

This reverts previous commits related to startup snashpt blob
creation of builtin JavaScript functions.
The allocation

MB-20285 Revert startup snapshot blob which hampers performance

This reverts previous commits related to startup snashpt blob
creation of builtin JavaScript functions.
The allocation and deallocation of startup blob during every
invocation of view binaries like index-builder, compactor
and index-cleanup, called by couchdb results in degradation
of performance.

Revert "MB-20084, MB-20085 Initialize V8 startup data blob if reducers defined."

This reverts commit 1c4edd04b2a43cf21e082fc71f99df46ca98be56.

Revert "MB-19899 Initialize V8 only if reduce is implemented"

This reverts commit 44d1df0c7f9e61bc116f0599c8bb354abe7148e7.

Revert "MB-17567 Add startup snapshot for builtin JavaScript functions"

This reverts commit a75e732c3222c66590ddcd94333ae356f8c12839.

Change-Id: I4961d1b48fd6e71aa0702be43c747e1115370828
Reviewed-on: http://review.couchbase.org/66198
Tested-by: buildbot <build@couchbase.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>
Reviewed-by: Abhishek Singh <abhishek@couchbase.com>

show more ...


# 2fd7fad3 19-May-2016 Trond Norbye <trond.norbye@gmail.com>

Remove unused code (md5 hashing lib)

Change-Id: I124176a1d03875a3e156f130437f8cb743e63b2e
Reviewed-on: http://review.couchbase.org/64206
Reviewed-by: Will Gardner <will.gardner@couch

Remove unused code (md5 hashing lib)

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

show more ...


Revision tags: v4.5.0
# 0f3511de 12-May-2016 harsha <hhs.couchbase@gmail.com>

Enable asserts in release builds

Change-Id: I3d9db31a47efb34c5ffd4cde4df60a9b34692c8a
Reviewed-on: http://review.couchbase.org/63975
Reviewed-by: Dave Rigby <daver@couchbase.com>

Enable asserts in release builds

Change-Id: I3d9db31a47efb34c5ffd4cde4df60a9b34692c8a
Reviewed-on: http://review.couchbase.org/63975
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>

show more ...


# b2319973 21-Apr-2016 Will Gardner <will.gardner@couchbase.com>

Add object lib for test file ops and visibility of create_file_ops

The purpose of this is to allow usage of create_default_file_ops
and the test file ops from another project (e.g. ep-en

Add object lib for test file ops and visibility of create_file_ops

The purpose of this is to allow usage of create_default_file_ops
and the test file ops from another project (e.g. ep-engine).

Change-Id: Ida99b74d0994759d792e4f915a83e32f021ddcc5
Reviewed-on: http://review.couchbase.org/63173
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# bcc4d4ba 19-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Split out slow parts of the couchstore_testapp

Some parts of the couchstore_testapp take 10s of seconds
to run - longer under Valgrind. This change splits out
these parts into their

Split out slow parts of the couchstore_testapp

Some parts of the couchstore_testapp take 10s of seconds
to run - longer under Valgrind. This change splits out
these parts into their own tests so that they may run in
parallel.

Before:
Normal ~40s
Valgrind ~90s
After:
Normal ~35s
Valgrind ~60s

Change-Id: I1f54568058bea21f0079b7e4b5636dd783836087
Reviewed-on: http://review.couchbase.org/61745
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>

show more ...


# a75e732c 28-Mar-2016 harsha <hhs.couchbase@gmail.com>

MB-17567 Add startup snapshot for builtin JavaScript functions

Change-Id: I250172a9414bc75e818bc852c87032c93f602dc0
Reviewed-on: http://review.couchbase.org/62053
Reviewed-by: Dave R

MB-17567 Add startup snapshot for builtin JavaScript functions

Change-Id: I250172a9414bc75e818bc852c87032c93f602dc0
Reviewed-on: http://review.couchbase.org/62053
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>

show more ...


# f7ebb47e 15-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Add testsuite for wrapping FileOps

This set of tests is used to verify that FileOps which wrap
other FileOps immediately propogate errors as they occur.

The tests are broken int

Add testsuite for wrapping FileOps

This set of tests is used to verify that FileOps which wrap
other FileOps immediately propogate errors as they occur.

The tests are broken into three groups to allow approriate
testing of buffers file operations.

Change-Id: I97e2751d4ebed97c1d3284794742fb0594e8cb29
Reviewed-on: http://review.couchbase.org/61486
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# bc5b01ee 16-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Fix Python tests on OSX

Python tests were disabled on OSX to resolve python binding issues
as part of MB-16454. This change adds compatibility to allow running
the Python tests on OS

Fix Python tests on OSX

Python tests were disabled on OSX to resolve python binding issues
as part of MB-16454. This change adds compatibility to allow running
the Python tests on OSX.

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

show more ...


# 0b948c55 16-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Enable code coverage for couchstore

Change-Id: I5d15d9486f3bc0a455b8f700e4c918edf412f395
Reviewed-on: http://review.couchbase.org/61586
Reviewed-by: Dave Rigby <daver@couchbase.com>

Enable code coverage for couchstore

Change-Id: I5d15d9486f3bc0a455b8f700e4c918edf412f395
Reviewed-on: http://review.couchbase.org/61586
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


Revision tags: v4.5.1
# a864606f 11-Feb-2016 Will Gardner <will.gardner@couchbase.com>

Add error injection tests for fileops

This changes adds a large number of tests for the
purposes of testing how Couchstore reacts to errors
which originate from the file system.

Add error injection tests for fileops

This changes adds a large number of tests for the
purposes of testing how Couchstore reacts to errors
which originate from the file system.

It adds a class MockOps, an implementation of
FileOpsInterface, which can be used to inject errors
at the File Ops layer.

This has been used to add a test which injects an
error for every file ops code-path on the public API
to ensure that errors are propagated properly and
immediately.

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

show more ...


1234