This is a Riak storage backend that uses WiredTiger, an Erlang interface to the WiredTiger k/v pair storage engine, and an abstract async thread-pool layer for Erlang's NIF API called c_src/async_nif.h.
Find a file
Steve Vinoski 2e37fc1bd1 avoid using cursor-fetched values after closing cursor
The wterl:session_get function was fetching a value using a cursor, then
closing the cursor, and then trying to use the fetched value to create the
return binary. According to the WiredTiger documentation, this is a no-no
-- a value is good only until the next operation on the cursor used to
fetch it. We've been seeing occasional segmentation violations in the
memcpy for the fetched value, and this might explain it.
2012-04-04 20:13:58 -04:00
c_src avoid using cursor-fetched values after closing cursor 2012-04-04 20:13:58 -04:00
src wterl:session_create still fails, keep ignoring return value 2012-04-04 15:57:38 -04:00
.gitignore add emacs backup files to .gitignore 2012-02-16 13:32:29 -05:00
enable-wterl no longer need to set wterl in riak_kv.app.src file 2012-03-31 19:41:07 -04:00
Makefile Make it a text file (newline at end). 2012-02-16 13:02:37 -05:00
README.md add README 2012-03-27 22:27:50 -04:00
rebar Initial commit 2011-12-18 13:54:46 -07:00
rebar.config Basics of conn/session instantiation working 2011-12-21 21:46:35 -07:00

wterl is an Erlang interface to the WiredTiger database, and is written to support a Riak storage backend that uses WiredTiger.

This backend currently supports only key-value storage and retrieval.

Remaining work includes:

  • The wterl:session_create function currently returns an error under certain circumstances, so we currently ignore its return value.
  • The riak_kv_wterl_backend module is currently designed to rely on the fact that it runs in just a single Erlang scheduler thread, which is necessary because WiredTiger doesn't allow a session to be used concurrently by different threads. If the KV node design ever changes to involve concurrency across scheduler threads, this current design will no longer work correctly.
  • Currently the riak_kv_wterl_backend module is stored in this repository, but it really belongs in the riak_kv repository.
  • There are currently some stability issues with WiredTiger that can sometimes cause errors when restarting KV nodes with non-empty WiredTiger storage.

Future support for secondary indexes requires WiredTiger features that are under development but are not yet available.

Deploying

You can deploy wterl into a Riak devrel cluster using the enable-wterl script. Clone the riak repo, change your working directory to it, and then execute the enable-wterl script. It adds wterl as a dependency, runs make all devrel, and then modifies the configuration settings of the resulting dev nodes to use the WiredTiger storage backend.