History log of /6.0.3/couchstore/include/ (Results 1 - 25 of 119)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v6.0.3
c2c458ff19-Mar-2019 sduvuru <sduvuru@gmail.com>

MB-35058: Couchstore-Trace operations on a file

-Tracing support to couchstore and dump trace on detection of corruption
-mprotect of iobuffer
-verify write to buffer cache by readin

MB-35058: Couchstore-Trace operations on a file

-Tracing support to couchstore and dump trace on detection of corruption
-mprotect of iobuffer
-verify write to buffer cache by reading back

The validation checks are passed in as flags when opening the database file.
The options are tracing, write validation and mprotect
-- tracing is turned on
-- write verification by reading back the written block
-- mprotect of internal iobuffer

Note: mprotect is not supported for windows platform.

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

show more ...

2b2ba19329-Oct-2018 sduvuru <sduvuru@gmail.com>

MB-31835: Couchstore- Log messages when a corruption is detected

MB-31767: Couchstore- Log messages when a corruption is detected

When a corruption is detected, log the file offset,

MB-31835: Couchstore- Log messages when a corruption is detected

MB-31767: Couchstore- Log messages when a corruption is detected

When a corruption is detected, log the file offset, the checksum
and length fields. When an index node corruption was seen it
showed checksum and length fied corruption. Some corruptions
indicated the checksum was ok but snappy uncompression failed
to uncompress. If the length and checksum are 0, it is possible
for checksum validation to pass, but the snappy uncompress will
report an error. The new log will help verify if the length is 0.

When writing, snappy compression failures and unexpected increase
in size after compression are logged. The size increase is possible
but rare.

A new interface "couchstore_last_internal_error" which reports the last
internal error in case of a failure is returned.

There is a test case to inject an error to corrupt the length and
checksum to 0. This will not result in a checksum error but a
corruption error.

Change-Id: I2c3788510291b6eee7f43b1b22f0ed6eabe2359c
Reviewed-on: http://review.couchbase.org/101163
Reviewed-on: http://review.couchbase.org/101393
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Tai <tai.qtt@gmail.com>

show more ...

Revision tags: v5.5.3, v5.1.2
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 ...

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

59f431cf15-Aug-2017 Dave Rigby <daver@couchbase.com>

Add support for per-filehandle statistics

Add a new function to the couchstore public API -
couchstore_get_db_filestats(). This returns an optional FHStats
interface which callers ca

Add support for per-filehandle statistics

Add a new function to the couchstore public API -
couchstore_get_db_filestats(). This returns an optional FHStats
interface which callers can use to obtain statistics about the
underlying file handle.

The FHStats interface initially supports two methods:

- getReadCount() to return the number of read() calls on this handle.
- getWriteCount() to return the nubmer of write() calls.

These is needed by kv_engine as it wants to obtain statistics on a
per-file basis, as recorded by StatsOps (couch-fs-stats.h).

Note that the included FileOps implementations in couchstore to *not*
suppport this API currently; one would need to use ep-engine's StatOps
to make use of them. However it may be advantageous to move some of
the stats tracking directly into couchstore in future.

Change-Id: Ie1fff97dad9fd5a95e829ff61b91a6ec5f5a975b
Reviewed-on: http://review.couchbase.org/82316
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...

Revision tags: v5.0.0
ea89a54301-Aug-2017 Dave Rigby <daver@couchbase.com>

MB-25509: Add periodic sync()ing after N bytes written

Add the ability for couchstore to automatically issue sync()
operations after every N bytes written.

When writing large am

MB-25509: Add periodic sync()ing after N bytes written

Add the ability for couchstore to automatically issue sync()
operations after every N bytes written.

When writing large amounts of data (e.g during compaction), read
latency can be adversely affected if a single sync() is made at the
end of writing all the data; as the IO subsystem has a large amount
of outstanding writes to flush to disk. By issuing periodic syncs
the affect on read latency can be signifcantly reduced.

This functionality is disabld by default, but may be enabled by
specifying a new flag to couchstore_open_db():
COUCHSTORE_OPEN_WITH_PERIODIC_SYNC.

Encoded as a power-of-2 KB value, ranging from 1KB .. 1TB (5 bits). A
value of N=0 specifies that automatic fsync is disabled.

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

show more ...

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

89922e7f07-Jul-2017 Dave Rigby <daver@couchbase.com>

platform.h needed for ssize_t on WIN32

ssize_t doesn't exist on WIN32, we need to include
<platform/platform.h> to get an alternative definition. Add the
appropriate header here, so

platform.h needed for ssize_t on WIN32

ssize_t doesn't exist on WIN32, we need to include
<platform/platform.h> to get an alternative definition. Add the
appropriate header here, so couchstore header files are standalone
(given that kv_engine is cleaning up its headers to remove unnecessary
includes, which was previously causing file_ops.h to get platform.h
"for free").

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

show more ...

8139f9a419-May-2017 Sriram Ganesan <sriram@couchbase.com>

MB-23764: Initialize Doc structure

Initializing the doc structure will get rid of the valgrind
error "conditional jump based on uninitialized data"

Change-Id: Ie8b876c1c772ba426

MB-23764: Initialize Doc structure

Initializing the doc structure will get rid of the valgrind
error "conditional jump based on uninitialized data"

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

show more ...

4c87b0b411-May-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-20003: Add an option for custom B+tree node size

* Similar to customizing buffer IO configurations, added one more
option for db_open(), to explicitly set the size of KP and KV node

MB-20003: Add an option for custom B+tree node size

* Similar to customizing buffer IO configurations, added one more
option for db_open(), to explicitly set the size of KP and KV node
of B+tree.

* If the option is set to zero, default size (1279 bytes) will be used
the same as now.

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

show more ...

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

44fa0fbb28-Mar-2017 Sriram Ganesan <sriram@couchbase.com>

MB-23211: Provide document body to expiration callback

Provide the entire body to the expiration callback in case
the client needs to make changes to the content of the
document

MB-23211: Provide document body to expiration callback

Provide the entire body to the expiration callback in case
the client needs to make changes to the content of the
document

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

show more ...

27872de824-Apr-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-23554: Unify corrupted document/B+tree node toleration flags

* We don't need to maintain two different flags for corrupt data
toleration, in the same API:
COUCHSTORE_INCLUDE_COR

MB-23554: Unify corrupted document/B+tree node toleration flags

* We don't need to maintain two different flags for corrupt data
toleration, in the same API:
COUCHSTORE_INCLUDE_CORRUPT_DOCS
COUCHSTORE_TOLERATE_CORRUPTION

* INCLUDE_CORRUPT_DOCS flag is currently being used in couch_dump
only. Now it is replaced with TOLERATE_CORRUPTION flag.

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

show more ...

f436b42c18-Apr-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-23554: Add a new option to skip corrupted B+tree node

* Added a new flag to lookup_request parameter structure. If this flag
is set, we do not stop traversing the tree even though cor

MB-23554: Add a new option to skip corrupted B+tree node

* Added a new flag to lookup_request parameter structure. If this flag
is set, we do not stop traversing the tree even though corrupted node
is found (but eventually error code will be returned at the end of API
if once we observe corrupted node).

* This option is turned off by default (same as the current behavior),
and will be used for the error diagnose/recovery tool.

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

show more ...

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

d3125d9b15-Feb-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

CBCS-4, MB-19995: Make read buffer unit size and count configurable

* We can use the second LSByte of open flags as configurable parameters
for read buffer unit size (first 4 bits) and b

CBCS-4, MB-19995: Make read buffer unit size and count configurable

* We can use the second LSByte of open flags as configurable parameters
for read buffer unit size (first 4 bits) and buffer count (next 4 bits).
Unit size and count can be ranged from 1KB to 16MB and 8 to 128K,
respectively.

* Setting flags to zero represents using the default value.

* To do: current buffer implementation is based on LRU linked list,
which will be inefficient for larger buffer count (> 100). We need to
use an index such as simple hash table in addition to LRU list, to
retrieve the buffer corresponding to the requested offset quickly.

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

show more ...

Revision tags: v4.6.0, v4.6.0-DP, v4.5.1-MP1, v4.5.0
f7ebb47e15-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 ...

c5ca445e25-Feb-2016 Will Gardner <will.gardner@couchbase.com>

MB-18054 Refactor file ops to propogate file close errors properly

This change refactors the `close` file operation to correctly
progogate any underlying IO errors. It also removes the i

MB-18054 Refactor file ops to propogate file close errors properly

This change refactors the `close` file operation to correctly
progogate any underlying IO errors. It also removes the implicit
file close from couchstore_destroy_db (previously:
couchstore_close_db) and requires a user to call
couchstore_close_file (previously: couchstore_drop_file).

This is done to allow the user to get the oserror following an os
error as they would otherwise have an invalid db handle.

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

show more ...

2ca8c27c09-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Add flag to open database file without IOP buffering

This change adds a new couchstore_open_db flag,
COUCHSTORE_OPEN_FLAG_UNBUFFERED which will result
in the FileOpsInterface passed

Add flag to open database file without IOP buffering

This change adds a new couchstore_open_db flag,
COUCHSTORE_OPEN_FLAG_UNBUFFERED which will result
in the FileOpsInterface passed in not being proxied
by an IO buffer.

It also adds a new couchstore_compact_db flag,
COUCHSTORE_COMPACT_FLAG_UNBUFFERED which does the
same thing for compaction.

This is necessary so that a mock file ops
implementation can predictably inject errors in
specific locations.

Change-Id: Idfa7c83cce186c7154842307698e48e9b7f7645f
Reviewed-on: http://review.couchbase.org/61184
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Will Gardner <will.gardner@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...

96cdfff909-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Remove couchstore_reopen_file

This patch removes couchstore_reopen_file as it is completely unused,
does not function properly under windows and the semantics of it are
broken (Every

Remove couchstore_reopen_file

This patch removes couchstore_reopen_file as it is completely unused,
does not function properly under windows and the semantics of it are
broken (Everytime a file is reopened it will wrap it in another
iobuffer).

couchstore_drop_file is left as a later patch will make use of it.

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

show more ...

Revision tags: v4.5.1
8f6123bf11-Feb-2016 Will Gardner <will.gardner@couchbase.com>

Convert file ops from a C style interface to a C++ class

The purpose of this is to facilitate mocking the file ops
for improved testing of logging in error scenarios.

Change-Id:

Convert file ops from a C style interface to a C++ class

The purpose of this is to facilitate mocking the file ops
for improved testing of logging in error scenarios.

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

show more ...

3bf5d61408-Mar-2016 Will Gardner <will.gardner@couchbase.com>

Revert "Convert file ops from a C style interface to a C++ class"

This reverts commit 99dc9d743f7823488610cc4cade053a7b23dd645.

Change-Id: I9e11813b3ea62fc0b7df1b620d22c28797aa3e29

Revert "Convert file ops from a C style interface to a C++ class"

This reverts commit 99dc9d743f7823488610cc4cade053a7b23dd645.

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

show more ...

99dc9d7411-Feb-2016 Will Gardner <will.gardner@couchbase.com>

Convert file ops from a C style interface to a C++ class

The purpose of this is to facilitate mocking the file ops
for improved testing of logging in error scenarios.

Change-Id:

Convert file ops from a C style interface to a C++ class

The purpose of this is to facilitate mocking the file ops
for improved testing of logging in error scenarios.

Change-Id: Ief611fd6f942787438fb37fb43a7314449fb342d
Reviewed-on: http://review.couchbase.org/60189
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.1.0
7a1ecb6131-Jul-2015 Jim Walker <jim@couchbase.com>

Enable crc32c in couchstore. Changes couchstore file version.

This increases the couchstore version number from 11 to 12.

The idea is that we wish to utilise crc32c for efficient ch

Enable crc32c in couchstore. Changes couchstore file version.

This increases the couchstore version number from 11 to 12.

The idea is that we wish to utilise crc32c for efficient checksumming.

The strategy is to bump the version number.
- version 11 files use the old crc.
- version 12 files use the new crc.

1) Brand new couchstore files will be version 12.

1a) However the API allows users to open files and force
legacy CRC, this is in-case any couchstore user doesn't
want to upgrade (e.g. erlang couchdb).

Opening a file with COUCHSTORE_OPEN_WITH_LEGACY_CRC will
force the version to 11 if the file is new. If the file is
not new the open is failed if the file version is not 11.

2) Compaction is the method to have upgrades performed.

A new compaction flag COUCHSTORE_COMPACT_FLAG_UPGRADE_DB
informs compaction that if the file to be compacted is
version 11, then the new file is version 12.

If the flag is not specified then compaction writes the new
file with same version/crc as the source file.

3) Views are not being upgraded to CRC-32C as part of this commit.
Code which opens tree-files specifies CRC32 explictly so that
they are compatible with couchdb/geocouch code. Upgrading views
to crc32c is a separate item.

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

show more ...

12345