History log of /6.0.3/forestdb/src/filemgr.h (Results 1 - 25 of 141)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 56236603 09-Mar-2018 sduvuru <sduvuru@gmail.com>

MB-28014: Index node crashing with FDB error

When ForestDB encounters a corrupted buffer, currently it just asserts and crashes.
When indexer restarts, it again encounters the same corru

MB-28014: Index node crashing with FDB error

When ForestDB encounters a corrupted buffer, currently it just asserts and crashes.
When indexer restarts, it again encounters the same corrupted buffer and crashes again.
The indexer then has no way of determining the specific index file (forestDB file)
which is corrupt and disable the specific index.

This fix will handle corruption that is detected in the following way.
If buffer (on disk or on the buffer pool) is found to be corrupt,
the current dbheader will be marked as invalid and an error, FDB_RECOVERABLE_ERR,
will be returned. When the file is reopened, forestdb will move to the first valid
dbheader skipping the DBheaders that were marked as invalid. If the forestdb file open
encounters "num_keeping_headers", a config parameter, invalid dbheaders it will return
FDB_NONRECOVERABLE_ERR, a nonrecoverable error. The indexer will now be able to
determine the index is not recoverable and invalidate it so that it can be rebuilt.

The fix also has two functional tests which corrupt index and data pages and recovers
up to num_keeping_headers configuration value.

Change-Id: I181abface1ffe2e926597dccb883bb818b31d63a
Reviewed-on: http://review.couchbase.org/91777
Reviewed-by: Sundar Sridharan <sundar@couchbase.com>
Tested-by: Sundar Sridharan <sundar@couchbase.com>

show more ...


# b6e47bcd 22-Jun-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

[BP] MB-22718: Add an API to find last valid file

* Added a new flag to DB header, indicates whether or not compaction
has been done successfully.

* Added a new API to check val

[BP] MB-22718: Add an API to find last valid file

* Added a new flag to DB header, indicates whether or not compaction
has been done successfully.

* Added a new API to check validity of the given series of files, using
above flag.

* It returns the last valid index number of the given file name array.

* All given files should belong to the same series of logical DB
instance.

Change-Id: Id6fd51cb3186e614f6c76837512374292a8877dd
Reviewed-on: http://review.couchbase.org/79901
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: Jung-Sang Ahn <jungsang.ahn@gmail.com>

show more ...


# e4615599 07-Feb-2017 Jung-Sang Ahn <jungsang.ahn@gmail.com>

[BP] MB-22538 Use file name instead of pointers for old/new file link

* Based on the same logic in
http://review.couchbase.org/#/c/66318

* Removed prev_file, new_file pointers

[BP] MB-22538 Use file name instead of pointers for old/new file link

* Based on the same logic in
http://review.couchbase.org/#/c/66318

* Removed prev_file, new_file pointers, and added new member variable
for new file name.

* Both old file name and new file name are used for tracking the
compaction order.

Change-Id: I211e3f6ac237305badae882dcd46cb81af30b01a
Reviewed-on: http://review.couchbase.org/73263
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Jung-Sang Ahn <jungsang.ahn@gmail.com>

show more ...


Revision tags: v1.2
# 34d1f130 28-Apr-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-19173 Maintain in-memory stale block info

- Keep system docs that contain the list of stale regions in-memory
to skip scanning stale-block tree.

- After block reclaim, do not

MB-19173 Maintain in-memory stale block info

- Keep system docs that contain the list of stale regions in-memory
to skip scanning stale-block tree.

- After block reclaim, do not remove & free the remaining items from
'merge-tree', and reuse the items in the next block reclaim without
re-loading them from the corresponding system doc.

Change-Id: I34ff747d55954d284105d3ee1e8be68fa4facb97
Reviewed-on: http://review.couchbase.org/63226
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 97bd3815 28-Apr-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-19286 Adjust 'bmp_revnum' for 'cur_alloc_bid'

- When a commit is invoked just before block reclaim, then the commit
header is located at the end of file and the current allocatable

MB-19286 Adjust 'bmp_revnum' for 'cur_alloc_bid'

- When a commit is invoked just before block reclaim, then the commit
header is located at the end of file and the current allocatable
block (cur_alloc_bid) is the first block in the bitmap. In this case,
BMP revision number (bmp_revnum) of commit header block is different
to that of 'cur_alloc_bid' block. However, 'last_commit_bmp_revnum'
is incorrectly set using the 'bmp_revnum' header block, thus
sb_bmp_is_writable() may return incorrect answer.

- To avoid this issue, just update 'bmp_revnum' once again in
filemgr_commit_bid(). This is the most simple way for this problem.

Change-Id: Ib2d56bb0bbe27e93493fffa1e6fc99f78b224d9f
Reviewed-on: http://review.couchbase.org/63350
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# 5b0b2b2e 14-Apr-2016 Sundar Sridharan <sundar.sridharan@gmail.com>

MB-19179: Disable WAL seqtree if FDB_SEQTREE_NOT_USE

This fixes crashes in cbft and also improves point query perf

Change-Id: If15c72d39119b215b7c5566e51ac5faee455978f
Reviewed-

MB-19179: Disable WAL seqtree if FDB_SEQTREE_NOT_USE

This fixes crashes in cbft and also improves point query perf

Change-Id: If15c72d39119b215b7c5566e51ac5faee455978f
Reviewed-on: http://review.couchbase.org/62809
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# a8f01baa 14-Apr-2016 abhinavdangeti <abhinav@couchbase.com>

Address data race with filemgr's bcache

Change-Id: I98a94cd9cc7acfce02bdf15b67e0cf9ace95e0e0
14:15:16 WARNING: ThreadSanitizer: data race (pid=68020)
14:15:16 Write of size 8 at 0x

Address data race with filemgr's bcache

Change-Id: I98a94cd9cc7acfce02bdf15b67e0cf9ace95e0e0
14:15:16 WARNING: ThreadSanitizer: data race (pid=68020)
14:15:16 Write of size 8 at 0x7d6400163b28 by thread T15 (mutexes: write M13):
14:15:16 #0 _fname_create(filemgr*) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:812 (e2etest+0x0000004d5c60)
14:15:16 #1 bcache_write /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:1062 (e2etest+0x0000004d526d)
14:15:16 #2 filemgr_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:2043 (e2etest+0x0000004f1a9b)
14:15:16 #3 _docio_read_through_buffer(docio_handle*, unsigned long, err_log_callback*, bool) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:691 (e2etest+0x0000004ea770)
14:15:16 #4 docio_read_doc /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:1212 (e2etest+0x0000004eb86f)
14:15:16 #5 fdb_kvs_header_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1123 (e2etest+0x000000522e4c)
14:15:16 #6 _fdb_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:1720 (e2etest+0x0000004fa137)
14:15:16 #7 fdb_check_file_reopen /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2800 (e2etest+0x0000004fcb77)
14:15:16 #8 fdb_set /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:3607 (e2etest+0x00000050372f)
14:15:16 #9 fdb_set_kv <null> (e2etest+0x0000004d2a29)
14:15:16 #10 update_thread(void*) crtstuff.c (e2etest+0x0000004c9d26)
14:15:16
14:15:16 Previous read of size 8 at 0x7d6400163b28 by thread T14:
14:15:16 #0 bcache_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/blockcache.cc:924 (e2etest+0x0000004d4ddf)
14:15:16 #1 filemgr_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1976 (e2etest+0x0000004f14f1)
14:15:16 #2 _docio_read_through_buffer(docio_handle*, unsigned long, err_log_callback*, bool) /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:691 (e2etest+0x0000004ea770)
14:15:16 #3 docio_read_doc /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/docio.cc:1212 (e2etest+0x0000004eb86f)
14:15:16 #4 fdb_kvs_header_read /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1123 (e2etest+0x000000522e4c)
14:15:16 #5 _fdb_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:1720 (e2etest+0x0000004fa137)
14:15:16 #6 fdb_check_file_reopen /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2800 (e2etest+0x0000004fcb77)
14:15:16 #7 fdb_set /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:3607 (e2etest+0x00000050372f)
14:15:16 #8 fdb_set_kv <null> (e2etest+0x0000004d2a29)
14:15:16 #9 e2e_fdb_set_person crtstuff.c (e2etest+0x0000004d0392)
14:15:16 #10 seq_writer_thread(void*) crtstuff.c (e2etest+0x0000004c9c62)
Reviewed-on: http://review.couchbase.org/62820
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# 44169673 06-Apr-2016 abhinavdangeti <abhinav@couchbase.com>

MB-19087: Address heap use after free issue with file pointers

In compaction scenario, before a file is freed, the
pointer to it held by a previous file and the pointer
to it held by

MB-19087: Address heap use after free issue with file pointers

In compaction scenario, before a file is freed, the
pointer to it held by a previous file and the pointer
to it held by a new file will need to be updated.

In the case of multiple files being present, and more than one
file has been redirected to the current file, the new_file pointers
of all those files will need to be updated in case the current file
is deleted.

10:59:36 WARNING: ThreadSanitizer: heap-use-after-free (pid=108627)
10:59:36 Read of size 1 at 0x7d640001f558 by main thread (mutexes: write M14, write M7597):
10:59:36 #0 filemgr_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1451 (iterator_functional_test+0x000000504b5f)
10:59:36 #1 _fdb_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7203 (iterator_functional_test+0x0000005123bb)
10:59:36 #2 _fdb_close_root /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7174 (iterator_functional_test+0x000000511854)
10:59:36 #3 fdb_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7135 (iterator_functional_test+0x00000051ee5a)
10:59:36 #4 iterator_concurrent_compaction() crtstuff.c (iterator_functional_test+0x0000004e2078)
10:59:36 #5 main crtstuff.c (iterator_functional_test+0x0000004e4e1d)
10:59:36
10:59:36 Previous write of size 8 at 0x7d640001f558 by main thread:
10:59:36 #0 free <null> (iterator_functional_test+0x00000046136b)
10:59:36 #1 filemgr_free_func /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1657 (iterator_functional_test+0x000000502a9f)
10:59:36 #2 filemgr_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1479 (iterator_functional_test+0x000000504ea4)
10:59:36 #3 _fdb_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7203 (iterator_functional_test+0x0000005123bb)
10:59:36 #4 fdb_kvs_close_all /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/kv_instance.cc:1789 (iterator_functional_test+0x000000537922)
10:59:36 #5 _fdb_close_root /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7157 (iterator_functional_test+0x0000005117d3)
10:59:36 #6 fdb_close /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:7135 (iterator_functional_test+0x00000051ee5a)
10:59:36 #7 iterator_concurrent_compaction() crtstuff.c (iterator_functional_test+0x0000004e2078)
10:59:36 #8 main crtstuff.c (iterator_functional_test+0x0000004e4e1d)

Change-Id: Iacf78604494026b33085663146d2adfda319fff9
Reviewed-on: http://review.couchbase.org/62449
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# 89e47c08 04-Apr-2016 abhinavdangeti <abhinav@couchbase.com>

MB-19042: Address data race with fetching file's kv_header

11:38:55 WARNING: ThreadSanitizer: data race (pid=121717)
11:38:55 Write of size 8 at 0x7d6400a12d60 by thread T4 (mutexes: w

MB-19042: Address data race with fetching file's kv_header

11:38:55 WARNING: ThreadSanitizer: data race (pid=121717)
11:38:55 Write of size 8 at 0x7d6400a12d60 by thread T4 (mutexes: write M13601):
11:38:55 #0 filemgr_set_kv_header /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:2473 (e2etest+0x0000004f4bd3)
11:38:55 #1 _fdb_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:1697 (e2etest+0x0000004f9b97)
11:38:55 #2 fdb_check_file_reopen /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2774 (e2etest+0x0000004fc5b7)
11:38:55 #3 fdb_set /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:3581 (e2etest+0x00000050313f)
11:38:55 #4 fdb_set_kv <null> (e2etest+0x0000004d2a29)
11:38:55 #5 e2e_fdb_set_person crtstuff.c (e2etest+0x0000004d0392)
11:38:55 #6 writer_thread(void*) crtstuff.c (e2etest+0x0000004c9bd2)
11:38:55
11:38:55 Previous read of size 8 at 0x7d6400a12d60 by thread T41:
11:38:55 #0 _fdb_open /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:1691 (e2etest+0x0000004f9afa)
11:38:55 #1 fdb_check_file_reopen /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2774 (e2etest+0x0000004fc5b7)
11:38:55 #2 fdb_set /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:3581 (e2etest+0x00000050313f)
11:38:55 #3 fdb_set_kv <null> (e2etest+0x0000004d2a29)
11:38:55 #4 e2e_fdb_set_person crtstuff.c (e2etest+0x0000004d0392)
11:38:55 #5 writer_thread(void*) crtstuff.c (e2etest+0x0000004c9bd2)

Change-Id: I7d08e187edc3fa930d90065ed6b2524f266959ab
Reviewed-on: http://review.couchbase.org/62383
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: abhinav dangeti <abhinav@couchbase.com>

show more ...


# 3a9c88b0 04-Apr-2016 abhinavdangeti <abhinav@couchbase.com>

Address data race with filemgr_header's seqnum

11:02:03 WARNING: ThreadSanitizer: data race (pid=108225)
11:02:03 Write of size 8 at 0x7d64000c7658 by thread T17 (mutexes: write M57456

Address data race with filemgr_header's seqnum

11:02:03 WARNING: ThreadSanitizer: data race (pid=108225)
11:02:03 Write of size 8 at 0x7d64000c7658 by thread T17 (mutexes: write M57456):
11:02:03 #0 filemgr_set_seqnum /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1082 (fdb_functional_test+0x000000500f4c)
11:02:03 #1 fdb_set /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:3633 (fdb_functional_test+0x000000513483)
11:02:03 #2 _worker_thread(void*) crtstuff.c (fdb_functional_test+0x0000004d1bb0)
11:02:03
11:02:03 Previous read of size 8 at 0x7d64000c7658 by thread T21:
11:02:03 #0 fdb_kvs_get_seqnum /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/filemgr.cc:1077 (fdb_functional_test+0x000000507734)
11:02:03 #1 fdb_sync_db_header /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2726 (fdb_functional_test+0x00000050cada)
11:02:03 #2 fdb_get /home/couchbase/jenkins/workspace/forestdb-threadsanitizer-master/forestdb/src/forestdb.cc:2908 (fdb_functional_test+0x0000005105bd)
11:02:03 #3 _worker_thread(void*) crtstuff.c (fdb_functional_test+0x0000004d1aae)

Change-Id: I6279dde64d0a66ba524c86d8edc87469418e55ec
Reviewed-on: http://review.couchbase.org/62379
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# 20a13f6c 31-Mar-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-18859 Do not flush previous dirty set if newer set is already flushed

- Fix to following bug:

1) Dirty WAL flush -> create a dirty set #1.

2) Open a snapshot on dirty se

MB-18859 Do not flush previous dirty set if newer set is already flushed

- Fix to following bug:

1) Dirty WAL flush -> create a dirty set #1.

2) Open a snapshot on dirty set #1.

3) More dirty WAL flush & commit are invoked -> now there is no dirty
set except for #1.

4) One more commit is invoked with MANUAL_WAL_FLUSH option ->
nothing should be flushed, but in the current implementation, dirty
set #1 is flushed as it is the latest dirty set at this time.

(Although old set is flushed, it is OK because all dirty blocks in
the dirty set #1 already became immutable so that they will be
ignored.)

5) However, if blocks are reused, they can be overwritten and cause
data inconsistency or crash.

- To address this issue, commit operation explicitly assigns dirty
set to be flushed, instead of picking the latest dirty set in the AVL
tree.

Change-Id: I74255634531bff7e7c48ef0fd0f5e6224078fa86
Reviewed-on: http://review.couchbase.org/62267
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# e2e91538 30-Mar-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-18859 Add more flags for dirty index updates

- A dirty node (a set of dirty index blocks) once copied to newer
dirty node doesn't need to be copied again. Added a new flag for
it.

MB-18859 Add more flags for dirty index updates

- A dirty node (a set of dirty index blocks) once copied to newer
dirty node doesn't need to be copied again. Added a new flag for
it.

- A dirty index block once became immutable should not be copied to
newer node. Calling filemgr_is_writable() alone is not enough due to
circular block reuse; if the block is reclaimed, it becomes writable
again. Added a new flag indicating the immutability.

Change-Id: I3b1099f7b6450242ea8684056c2d04f927e8cbc9
Reviewed-on: http://review.couchbase.org/62170
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>

show more ...


# f7c15a5c 22-Mar-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-18747 Get rid of locking on closing dirty index node snapshot

- Now read-only thread will not grab lock during _fdb_kvs_close().

- And also minimized any critical sections relate

MB-18747 Get rid of locking on closing dirty index node snapshot

- Now read-only thread will not grab lock during _fdb_kvs_close().

- And also minimized any critical sections related to handling dirty
index node snapshots.

Change-Id: I33e0c95b5b739fdf82d8835c784eebf75067dd38
Reviewed-on: http://review.couchbase.org/61807
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# bc18d4ed 18-Mar-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-18747 Don't grab the spinlock in incrementing a ref counter

A reference counter for filemgr or filemgr_dirty_update_node can be incremented
without grabbing a spinlock because its ref

MB-18747 Don't grab the spinlock in incrementing a ref counter

A reference counter for filemgr or filemgr_dirty_update_node can be incremented
without grabbing a spinlock because its reference counter is already greater than
zero due to the existence of the source filemgr or filemgr_dirty_update_node.
Therefore, an atomic type should be enough to maintain their reference counters.

Change-Id: I130991a41e5ddc7ec4fd1b30f04e2be65c7dc367
Reviewed-on: http://review.couchbase.org/61691
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# aa8ae3ab 17-Mar-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-17904 Make C++11 support as a required build environment

As we plan to move our code repository to C++11 incrementally, this
commit makes C++11 support as a build environment required

MB-17904 Make C++11 support as a required build environment

As we plan to move our code repository to C++11 incrementally, this
commit makes C++11 support as a build environment required.

Change-Id: Iba2f8ceed33af635e61647b6522169c74e7cfed1
Reviewed-on: http://review.couchbase.org/61663
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# b165bcd6 17-Mar-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-17904 Use relaxed_memory_order if a strict consistent order is not required

If a given atomic variable doesn't require a strict consistent memory order,
then relaxed memory order shou

MB-17904 Use relaxed_memory_order if a strict consistent order is not required

If a given atomic variable doesn't require a strict consistent memory order,
then relaxed memory order should be enough for atomic operations. For example,
operation stats and some config parameters can use relaxed memory order.

Change-Id: Ic1454c5d23da64fbe5309968026938bdd6803d27
Reviewed-on: http://review.couchbase.org/61624
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# c83d9833 16-Mar-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-17904 Use C++11 atomic library if supported

If a build environment has C++11 support, then this change allows
us to use C++11 atomic library instead of other built-in implementations.

MB-17904 Use C++11 atomic library if supported

If a build environment has C++11 support, then this change allows
us to use C++11 atomic library instead of other built-in implementations.

The subsequent change will provide an atomic operation with a relaxed
memory order from C++11.

Change-Id: I9f26ceddb42c68f00deecf5518bfba388ff4c217
Reviewed-on: http://review.couchbase.org/61605
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


Revision tags: v1.1, v1.0
# ac2374b4 18-Feb-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-14710 Make in-memory copy of dirty index blocks during WAL flushing

- Maintain snapshots for dirty index blocks for each dirty WAL flushing.

- As index blocks in DB file are not

MB-14710 Make in-memory copy of dirty index blocks during WAL flushing

- Maintain snapshots for dirty index blocks for each dirty WAL flushing.

- As index blocks in DB file are not overwritten by on-going WAL
flushing, we don't need to grab filemgr_mutex anymore for snapshot
or iterator initizliation.

Change-Id: I35d2183d426c088cd0fbc9fd7e0d5ebc4c8a03eb

show more ...


# 671d9fba 19-Feb-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-17757 Return file system's error code to the client upon operation failure

A file system's error can happen while performing various file operations and
is captured in errno in linux

MB-17757 Return file system's error code to the client upon operation failure

A file system's error can happen while performing various file operations and
is captured in errno in linux and _get_errno() or GetLastError on Windows.
These errors are logged through the log callback from the client, but not
returned to the client as part of a response.

To address the above issue, this commit adds a new set of error codes that
correspond to potential errno codes that can happen while performing file
operations.

Change-Id: I84fe2edd281689570798e30cee5afe054a972a90

show more ...


# f7a5b7a7 15-Feb-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

Add a new API to return the version of a given ForestDB file

This change adds the new API fdb_get_file_version to return the string
representation of a ForestDB file version.

In

Add a new API to return the version of a given ForestDB file

This change adds the new API fdb_get_file_version to return the string
representation of a ForestDB file version.

In addition, this changes adds --header-only option to forestdb_dump tool
to print out the latest database header info including a file version.

$ ./forestdb_dump --header-only path_to_database_file

DB header info:
BID: 113 (0x71, byte offset: 462848)
DB header length: 88 bytes
DB header revision number: 5
DB file version: ForestDB v1.x format
...

Change-Id: I51e90bfb9aca3ae6c63db1292882f578f7e07cf0

show more ...


# f6642c4e 21-Jan-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

MB-17384 Make block reusing parameters configurable at runtime

With this change, block_reusing_threshold and num_keeping_headers
parameters can be tuned at runtime.

Change-Id: I

MB-17384 Make block reusing parameters configurable at runtime

With this change, block_reusing_threshold and num_keeping_headers
parameters can be tuned at runtime.

Change-Id: I5864eae6882e7a90d670f9fa7ad331d3ae98089e

Conflicts:
src/forestdb.cc

show more ...


# 82ac3394 27-Jan-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

Add a global index for opened FDB file handles

- Since a filemgr handle can have multiple FDB file handles, we have
to check all opened FDB file handles belonging to the same file when

Add a global index for opened FDB file handles

- Since a filemgr handle can have multiple FDB file handles, we have
to check all opened FDB file handles belonging to the same file when
getting the smallest active header revision number.

Change-Id: I0aa71b0fcff244d623199ea904ff08707df2bc2c

show more ...


# 27376f3b 05-Jan-2016 Jung-Sang Ahn <jungsang.ahn@gmail.com>

Pre-reclaim stale blocks for next round block reuse

- Reclaiming stale blocks only when there is no more free block makes
the file size increase more and more, as there is some time gap

Pre-reclaim stale blocks for next round block reuse

- Reclaiming stale blocks only when there is no more free block makes
the file size increase more and more, as there is some time gap between
the exhaustion of free blocks and reclaiming new blocks.

- To address this issue, we need to pre-reclaim stale blocks for the
next round block reuse.

Change-Id: I4b8092c81038a51ed786a90e97560e5d228705b2

show more ...


# f0b1bf77 07-Dec-2015 Jung-Sang Ahn <jungsang.ahn@gmail.com>

MB-16219 Support superblock and circular block reusing

- Super blocks point to the up-to-date DB header.

- When configured conditions are satisfied, stale blocks are reused
in a

MB-16219 Support superblock and circular block reusing

- Super blocks point to the up-to-date DB header.

- When configured conditions are satisfied, stale blocks are reused
in a circular manner. This does not increase the DB file size, so
that we can largely reduce the overhead from compaction.

- The latest a few old versions are preserved for future snapshot
creation.

Change-Id: I6eb9209ced436c0a84ebb0216344eb04f300fca9

show more ...


# d7da1b39 22-Jan-2016 Chiyoung Seo <chiyoung.seo@gmail.com>

Revert "MB-17004 Don't flush the WAL for each commit in fdb_compact_upto"

This reverts commit f3e4c58fd3e651eca09f98aaee2599d8cba4963e.


123456