History log of /5.5.2/couchstore/ (Results 1 - 25 of 733)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3, v5.5.3, v5.1.2
3b4c35d713-Jun-2018 Jim Walker <jim@couchbase.com>

MB-29816: btree_lookup is skipping a key

In btree_lookup_inner when processing a KV node a while loop
exits too soon.

The loop condition looks at the distance into the node and

MB-29816: btree_lookup is skipping a key

In btree_lookup_inner when processing a KV node a while loop
exits too soon.

The loop condition looks at the distance into the node and
the index into the input keys.

while (bufpos < nodebuflen && current < end)

In the test we have many input keys, but 1 key in the
KV node.

The test has keys which after sorting means the first evaluated
key is not in the btree, so we will iterate once and revaluate
the loop condition. However bufpos = 50 and nodebuflen = 50
as we have read a key, however the second iteration doesn't
want to read a new key, it just wants to evaluate the second
input key. However bufpos < nodebuflen cause the loop to end
and we return with no callback for our key.

The commit updates the loop condition so that we keep going
whilst we have input keys and we explictly break from the
loop if an attempt to read a new key occurs and we have
no more buf space.

Change-Id: Ib93e11b5d5f03211f4a13301b64f20c7664b4ecd
Reviewed-on: http://review.couchbase.org/95669
Well-Formed: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Tim Bradgate <tim.bradgate@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...

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

Avoid undefined behaviour for zero-length rev-meta

As identified by UBSan when running couchstore-purge test:

runtime error: null pointer passed as argument 2, which is declared

Avoid undefined behaviour for zero-length rev-meta

As identified by UBSan when running couchstore-purge test:

runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x7f4c2e622f88 in assemble_id_index_value couchstore/src/couch_save.cc:57
#1 0x7f4c2e622f88 in add_doc_to_update_list couchstore/src/couch_save.cc:326
#2 0x7f4c2e622f88 in couchstore_save_documents couchstore/src/couch_save.cc:387

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

show more ...

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

Avoid undefined behaviour for zero-length reduce value

As reported by UBSan, it is undefined behviour to call memcpy() with a
null argument - in this case when encoding a root B-Tree nod

Avoid undefined behaviour for zero-length reduce value

As reported by UBSan, it is undefined behviour to call memcpy() with a
null argument - in this case when encoding a root B-Tree node which
has no reduce value (local tree has an empty reduce value).

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

show more ...

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

Avoid undefined behaviour for zero-length Document

As reported by UBSan, it is undefined behaviour to call memcpy() with
a null argument - in this case when Document has zero-length data

Avoid undefined behaviour for zero-length Document

As reported by UBSan, it is undefined behaviour to call memcpy() with
a null argument - in this case when Document has zero-length data.

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

show more ...

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

dbdiff: Correctly compare compressed values

Compressed values were previously not decompressed before comparing
their length or content.

This resulted in spurious differences be

dbdiff: Correctly compare compressed values

Compressed values were previously not decompressed before comparing
their length or content.

This resulted in spurious differences being reported; as when
documents are Snappy-compressed there's no guarantee that the exact
same compressed encoding will always be used. This manifested in the
size of compressed values sometimes differing by one.

Fix this by comparing the uncompressed length.

Additionally now we have the uncompressed value we can correctly
compare the (uncompressed) values.

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

show more ...

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

dbdiff: compare couchbase per-revision metdata

Expand dbdiff to compare the couchstore metadata (CAS, expiry, flags)
of each document.

Change-Id: If99476ce4354bb4820a5929b7ba305

dbdiff: compare couchbase per-revision metdata

Expand dbdiff to compare the couchstore metadata (CAS, expiry, flags)
of each document.

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

show more ...

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

dbdiff: Don't ignore differences in quiet mode

When dbdiff is run in quiet mode, it incorreclty skipped differences
when comparing docinfo objects. Quiet mode should only skip printing

dbdiff: Don't ignore differences in quiet mode

When dbdiff is run in quiet mode, it incorreclty skipped differences
when comparing docinfo objects. Quiet mode should only skip printing
the details; it shouldn't skip actually performing the checks.

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

show more ...

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

dbdiff: Output messages to stdout

Change dbdiff so the details of the differences between couchstore
files is output to stdout, instead of stderr. This makes it easier to
extract / m

dbdiff: Output messages to stdout

Change dbdiff so the details of the differences between couchstore
files is output to stdout, instead of stderr. This makes it easier to
extract / manipulate the output of the program (e.g. piping to grep).

Change-Id: I0f88a657071c136191fdad3206e7d47f02ed37dc
Reviewed-on: http://review.couchbase.org/93543
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

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

dbdiff: Convert to C++

Motivation for this is that I want to use C++ code (bitfields.h) in
dbdiff.

Change-Id: I6e5fb553e202127e0250f6fe1ade5e2dec94e708
Reviewed-on: http://r

dbdiff: Convert to C++

Motivation for this is that I want to use C++ code (bitfields.h) in
dbdiff.

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

show more ...

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

dbdiff: Correctly report deleted docs

dbdiff is incorrectly reporting that deleted documents are missing
from second couchstore file; when the document is deleted in both
files.

dbdiff: Correctly report deleted docs

dbdiff is incorrectly reporting that deleted documents are missing
from second couchstore file; when the document is deleted in both
files.

This is because if a document has been deleted; then it cannot be
fetched using couchstore_open_document(). Instead one must first call
couchstore_docinfo_by_id() to fetch the docinfo; and then examine
DocInfo.deleted.

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

show more ...

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

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

MB-28409: Reduce memory zeroing costs

During profiling of the slowdown seen in MB-28409, a number of
unnecessary memory zeroing instances were seen in couchstore:

* file_buffer

MB-28409: Reduce memory zeroing costs

During profiling of the slowdown seen in MB-28409, a number of
unnecessary memory zeroing instances were seen in couchstore:

* file_buffer uses a std::vector for a dynamic array. This is wastful
as (a) this array is never resized once created and (b) it doesn't
need zero-initializing (as std::vector does), as it's simply
allocating an empty buffer which will later be filled from disk
files.
Replace with a dynamic array (new[]) managed by unique_ptr; which is
default-initialized (and hence not zeroed).

* db_write_header() uses cb_calloc() to allocate zeroed memory for the
header it's about to write. However, the entirity of this memory
will be filled in with valid data before written to disk; therefore
we can instead just use cb_malloc().

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

show more ...

6a2d3d1014-Mar-2018 Dave Rigby <daver@couchbase.com>

MB-28669: UBSan: avoid nullptr when calculating fatbuf offset

Issue identified by UBSan:

couch_db.cc:1343:56: runtime error: member access within null pointer of type 'fatbuf' (aka

MB-28669: UBSan: avoid nullptr when calculating fatbuf offset

Issue identified by UBSan:

couch_db.cc:1343:56: runtime error: member access within null pointer of type 'fatbuf' (aka '_fat_buffer')
#0 0x1027ed23b in couchstore_free_local_document couch_db.cc:1343

/Technically/ dereferencing a nullptr is undefined. Replace with
offsetof() which is expicitly designed to solve this problem.

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

show more ...

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

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

MB-28453: Support compressed xattr documents in dbdump

Manually inflate documents which are marked as datatype
snappy (but not COUCH_DOC_IS_COMPRESSED)

Change-Id: Ib0e2442f4e5fc

MB-28453: Support compressed xattr documents in dbdump

Manually inflate documents which are marked as datatype
snappy (but not COUCH_DOC_IS_COMPRESSED)

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

show more ...

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

MB-28453: Switch xattrs from byte_buffer to char_buffer

KV-engine is unifying xattrs to use char_buffer, so dbdump.cc needs
a small change to remove an now unnecessary cast.

Fro

MB-28453: Switch xattrs from byte_buffer to char_buffer

KV-engine is unifying xattrs to use char_buffer, so dbdump.cc needs
a small change to remove an now unnecessary cast.

From the related kv-engine change:
<snip>
Overall we wish to remove the use of byte_buffer as we frequently
end up casting it to char. This commit just switches xattr code from
using a byte_buffer to char_buffer, making it easier to add
decompression support to xattr::Blob which is required to cleanly
address the MB this commit is linked with.
</snip>

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

show more ...

6ef489f302-Feb-2018 harsha <harsha.hs.81@gmail.com>

MB-27758 Use aligned access for array of double values

Newer gcc optimizes double arrays by storing them into
wider(128 to 256 bits) registers like xmm/sse registers.
Memory accesses

MB-27758 Use aligned access for array of double values

Newer gcc optimizes double arrays by storing them into
wider(128 to 256 bits) registers like xmm/sse registers.
Memory accesses from/to xmm registers should be aligned
to double boundary.
This patch introduces a temporary double pointer for
aligned access and copies result back to unaligned pointer.

Change-Id: I4f38f8c19389f81a56cfe7f72f08095f17ee2f7e
Reviewed-on: http://review.couchbase.org/88776
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jeelan Basha Poola <jeelan.poola@couchbase.com>

show more ...

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

Fix non-portable use of preprocessor

warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
^~~~~~~~~~

Change-Id: Icf51d98d0eaf2fd3ce21a3edd95df455eaed3

Fix non-portable use of preprocessor

warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
^~~~~~~~~~

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

show more ...

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

21c7409724-Oct-2017 Eugen-Alexandru Virtan <eugen.virtan@couchbase.com>

MB-26047:[7-c] Switch over to using MicrosecondHistogram

Part of a cross repo change.

Change the code to use MicrosecondHistogram and related types.

Change-Id: Ic061e11a79b

MB-26047:[7-c] Switch over to using MicrosecondHistogram

Part of a cross repo change.

Change the code to use MicrosecondHistogram and related types.

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

show more ...

Revision tags: v5.1.0, v5.0.0
7f77f3c827-Mar-2017 Dave Rigby <daver@couchbase.com>

couchstore.py: Check for couchstore err in getContents()

Check the return value of couchstore_open_doc_with_docinfo(), and
raise an exception on failure.

This makes any errors i

couchstore.py: Check for couchstore err in getContents()

Check the return value of couchstore_open_doc_with_docinfo(), and
raise an exception on failure.

This makes any errors in couchstore_open_doc_with_docinfo() explicit -
for example it will return

couchstore.CouchStoreException: checksum fail

instead of the more generic:

ValueError: NULL pointer access

in the event of a checksum failure in the file.

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

show more ...

47a8f09905-Oct-2017 Sriram Melkote <siri@couchbase.com>

MB-26279: Keep ArrayBuffer allocator around till isolate is done

Change-Id: I6e7f62bf8a70d41adf146ca882ed895e10fd96ea
Reviewed-on: http://review.couchbase.org/84068
Tested-by: Build

MB-26279: Keep ArrayBuffer allocator around till isolate is done

Change-Id: I6e7f62bf8a70d41adf146ca882ed895e10fd96ea
Reviewed-on: http://review.couchbase.org/84068
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Abhishek Singh <abhishek@couchbase.com>
Reviewed-by: Aman Kishore Achpal <aman.achpal@couchbase.com>

show more ...

c8c076c705-Oct-2017 Sriram Melkote <siri@couchbase.com>

MB-26279: Do not leak ArrayBuffer allocator

And retrigger buildbot...

Change-Id: I0bf921263475fe7413f2f04cdeca8a918473687b
Reviewed-on: http://review.couchbase.org/84061
Rev

MB-26279: Do not leak ArrayBuffer allocator

And retrigger buildbot...

Change-Id: I0bf921263475fe7413f2f04cdeca8a918473687b
Reviewed-on: http://review.couchbase.org/84061
Reviewed-by: Sriram Melkote <siri@couchbase.com>
Tested-by: Sriram Melkote <siri@couchbase.com>

show more ...

251b633e11-Sep-2017 Chris Hillery <ceej@couchbase.com>

CBD-2051: Update to V8 5.9 (required for eventing)

Change-Id: Ia6fa36f2ab9e3be32d569764851f8fdd5341ebb1
Reviewed-on: http://review.couchbase.org/83252
Reviewed-by: Chris Hillery <cee

CBD-2051: Update to V8 5.9 (required for eventing)

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

show more ...

745729c422-Aug-2017 Dave Rigby <daver@couchbase.com>

MB-25509: Add couchstore_encode_periodic_sync_flags()

Add a helper function to the couchstore API to aid in encoding a byte
value for periodic sync to the correct flags encoding.

MB-25509: Add couchstore_encode_periodic_sync_flags()

Add a helper function to the couchstore API to aid in encoding a byte
value for periodic sync to the correct flags encoding.

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

show more ...

12345678910>>...30