commit | 579e066c1402f41c7260631125f117b4dcdabf93 | [log] [tgz] |
---|---|---|
author | Nick Vatamaniuc <vatamane@apache.org> | Tue Jun 09 13:48:07 2020 -0400 |
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | Tue Jun 09 14:00:39 2020 -0400 |
tree | 3caf4461f51d966fa1e4c5d5b0bc5faaf4a33f6f | |
parent | 84db41c0d88cb3e6fac8561ee3010177cffdebc0 [diff] |
Do not apply default future timeouts to commit and on_error response `commit` should timeout based on the default transaction_too_old (1007) error or from an explicitly set transaction timeout option (1031). `on_error` may sleep for some time which is determined by the backoff and retry counts,it is limited and is guaranteed to return back.
This project is a NIF wrapper for the FoundationDB C API. Documentation on the main API can be found here.
This project also provides a conforming implementation of the Tuple and Directory layers.
Assuming you have installed the FoundationDB C API library, building erlfdb is as simple as:
$ make
Alternatively, adding erlfdb as a rebar dependency should Just Work ®.
Documentation for installing FoundationDB can be found here for macOS or here for Linux.
A simple example showing how to open a database and read and write keys:
Eshell V9.3.3.6 (abort with ^G) 1> Db = erlfdb:open(<<"/usr/local/etc/foundationdb/fdb.cluster">>). {erlfdb_database,#Ref<0.2859661758.3941466120.85406>} 2> ok = erlfdb:set(Db, <<"foo">>, <<"bar">>). ok 3> erlfdb:get(Db, <<"foo">>). <<"bar">> 4> erlfdb:get(Db, <<"bar">>). not_found
FoundationDB has a custom binding tester that can be used to test whether changes have broken compatibility. See the BINDING_TESTER documentation for instructions on building and running that system.