A Fast Key-Value Storage Engine Based on Hierarchical B+-Tree Trie
C++ CMake Other
Latest commit 8b80f88 Feb 9, 2017 @OliverMD OliverMD committed with greensky00 Guard against LIBRT=NOTFOUND on APPLE
As a result of upgrading the version of google benchmark used we need to
guard against LIBRT being set in the CMakeCache on MacOS which does not
have LIBRT. This is because google benchmark tries to find it without
checking it's not making for a non MacOS system. This means that when
it's not found it sets the variable as NOTFOUND rather than it not being
set at all. This interfered with the forestdb CMakeLists.txt.

Change-Id: I01b8ae6b041062f27eaa562722e016db1005910f
Reviewed-on: http://review.couchbase.org/73635
Reviewed-by: Jim Walker <jim@couchbase.com>
Tested-by: Jim Walker <jim@couchbase.com>

README.md

ForestDB

ForestDB is a key-value storage engine developed by Couchbase Caching and Storage Team, and its main index structure is built from Hierarchical B+-Tree based Trie, called HB+-Trie. ForestDB paper has been published in IEEE Transactions on Computers.

Compared with traditional B+-Tree based storage engines, ForestDB shows significantly better read and write performance with less storage overhead. ForestDB has been tested on various server OS environments (Centos, Ubuntu, Mac OS x, Windows) and mobile OSs (iOS, Android). The test coverage stats for ForestDB are available in ForestDB Code Coverage Report.

ForestDB benchmark program is also available for performance comparisons with other key-value storage engines.

Please visit the ForestDB wiki for more details.

Main Features

  • Keys and values are treated as an arbitrary binary.
  • Applications can supply a custom compare function to support a customized key order.
  • A value can be retrieved by its sequence number or disk offset in addition to a key.
  • Write-Ahead Logging (WAL) and its in-memory index are used to reduce the main index lookup / update overhead.
  • Multi-Version Concurrency Control (MVCC) support and append-only storage layer.
  • Multiple snapshot instances can be created from a given ForestDB instance to provide different views of database.
  • Rollback is supported to revert the database to a specific point.
  • Ranged iteration by keys or sequence numbers is supported for a partial or full range lookup operation.
  • Manual or auto compaction can be configured per ForestDB database file.
  • Transactional support with read_committed or read_uncommitted isolation level.

How to build

See INSTALL.MD

How to Use

Please refer to Public APIs and tests/fdb_functional_test.cc in ForestDB source directory.

How to file issues

Please file issues on the Couchbase JIRA tracker in the Couchbase Server (MB) project against the forestdb component.

How to contribute code

  1. Sign the Couchbase Contributor License Agreement
  2. Submit code changes via either a Github PR or via Gerrit (for Gerrit usage, see Instructions from the couchbase-spark-connector project.)