Khepri 0.14.0
At this point, Khepri should be considered Beta and not production ready. The API will likely evolve and future releases will likely introduce breaking changes. The goal of this release is to make it easy for anyone to try it and possibly give feedback.
What's new in Khepri 0.14.0
Command deduplication
Khepri uses a retry mechanism that send a command again whenever there is an error such as noproc
or nodedown
. However, the state machine could receive the command twice depending the actual underlying error and the timing.
This new version adds two new commands to wrap other commands that act as a kind of handshake between the "client" and the state machine. This new mechanism is only enabled by default for R/W transactions.
The version of the state machine is bumped from 0 to 1. The code is backward-compatible with Ra cluster members which don't know about these new commands.
See #250.
Simplify {error, timeout}
error type
The {error, {timeout, LeaderId}}
error was simplified to the more common {error, timeout}
, because the leader ID isn't interesting to the caller.
Here is an example of the change to make to your code:
-
Up to Khepri 0.13.x:
case khepri:exists(StoreId, Path) of {error, {timeout, _LeaderId}} -> handle_timeout() end
-
Start from Khepri 0.14.0:
case khepri:exists(StoreId, Path) of {error, timeout} -> handle_timeout() end
Seee #256.
Other changes
- Fixed a bug where a projection could be executed for a tree node that doesn't match the pattern if this tree is a grand-child of the pattern (#257).
- Ra was bumped from 2.9.1 to 2.10.1 (#258).
Download
Khepri 0.14.0 is available from Hex.pm: https://hex.pm/packages/khepri/0.14.0
Upgrade
Using Rebar:
-
Update your
rebar.config
:%% In rebar.config {deps, [{khepri, "0.14.0"}]}.
-
Run
rebar3 upgrade khepri
.
Using Erlang.mk:
-
Update your
Makefile
:%% In your Makefile dep_khepri = hex 0.14.0
-
Remove the
deps/khepri
directory. The new version will be fetched the next time you build your project.