diff --git a/.gitignore b/.gitignore index b6bad32..8090968 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ _build/ ebin/ doc/ + +# Must be generated locally +.clangd diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..1777357 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +erlang 27.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..86b50ce --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog for v0.x + +## v0.2.0 (2024-09-21) + +### Bug fixes + + * Several type specs in `erlfdb` were corrected. + +### Enhancements + + * `erlfdb:wait_for_all_interleaving/2`: Given a list of fold_future() or future(), calling this function will wait + on the futures at once, and then continue to issue any remaning get_range or get_mapped_range until + the result set is exhausted. This allows fdbserver to process multiple get_ranges at the same time, + in a pipelined fashion. + * `erlfdb:get_range_split_points/4`: Companion to `wait_for_all_interleaving`, this is an fdbserver-supported function + that will split a given key range into a partitioning set of ranges for which the key-values for each section are + approximately equal to the provided `chunk_size` option. There are limitations to this, namely that a hard + maximum of 100 shards can be traversed. The default `chunk_size` is 10000000 (in Bytes). + * `erlfdb:get_range*`: The default behavior of get_range is now more explicit in the type specs and with the `wait` + option, with defaults to `true`. A value of `false` will return a fold_future(), and `interleaving` is + an experimental feature that will use both `get_range_split_points` and `wait_for_all_interleaving` to retrieve the range. diff --git a/dev/DEV.md b/dev/DEV.md new file mode 100644 index 0000000..d966cfa --- /dev/null +++ b/dev/DEV.md @@ -0,0 +1,12 @@ +Developing in erlfdb +==================== + +.clangd config +-------------- + +The .clangd file cannot expand environment variables, so you should generate it +with the provided script, which assumes you're using asdf. + +```bash +./dev/gen-clangd-config.sh > .clangd +``` diff --git a/dev/gen-clangd-config.sh b/dev/gen-clangd-config.sh new file mode 100755 index 0000000..970dfab --- /dev/null +++ b/dev/gen-clangd-config.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cat << EOF +CompileFlags: + Add: + - -I$(asdf where erlang)/usr/include + - -DFDB_USE_LATEST_API_VERSION=1 +EOF diff --git a/src/erlfdb.app.src b/src/erlfdb.app.src index a0d860f..7daf042 100644 --- a/src/erlfdb.app.src +++ b/src/erlfdb.app.src @@ -12,7 +12,7 @@ {application, erlfdb, [ {description, "Erlang client for FoundationDB"}, - {vsn, "0.1.2"}, + {vsn, "0.2.0"}, {registered, []}, {applications, [kernel, stdlib]}, {maintainers, ["Jesse Stimpson"]},