All Versions
4
Latest Version
Avg Release Cycle
112 days
Latest Release
-
Changelog History
Changelog History
-
v2.0.0 Changes
- [breaking] The functions
get_and_update/3
andget_and_update_multi/3
now return directlyresult
, instead of a{:ok, result}
tuple. - [breaking]
get_and_update_multi/4
does not take an option argument anymore, making itget_and_update_multi/3
. The only available option used to be:timeout
, which is not supported anymore. - [breaking] Remove the
:timeout
option onselect/2
. This is part of a refactoring and improvement that moves read operations from an internally spawned Task to the client process. This makes the:timeout
option unnecessary: by stopping the process callingCubDB
, any running read operation by that process is stopped. - Add
snapshot/2
,with_snapshot/1
andrelease_snapshot/1
to get zero cost read only snapshots of the database. - Add
back_up/2
to produce a database backup. The backup process does not block readers or writers, and is isolated from concurrent writes. - Add
halt_compaction/1
to stop any running compaction operation - Add
compacting?/1
to check if a compaction is currently running - Move read and write operations to the caller process as opposed to the
CubDB
server process. - Improve concurrency of read operations while writing
⬆️ Upgrading from v1 to v2
⬆️ Upgrading from
v1
tov2
requires a few simple code changes:- When calling
get_and_update
orget_and_update_multi
, the return value is not a{:ok, result}
tuple anymore, but justresult
. get_and_update_multi
does not take a fourth option argument anymore. The only available option was:timeout
, which was now removed. In case you want to enforce a timeout for the update function, you can use aTask
andTask.yield
like explained here.- The
select
function does not support a:timeout
option anymore, so it will be ignored if passed. In order to enforce a timeout, you can wrap theselect
in aTask
and useTask.yield
like shown here
- [breaking] The functions
-
v1.1.0 Changes
October 14, 2021- Add
clear/1
function to atomically delete all entries in the database
- Add
-
v1.0.0
June 24, 2021 -
v0.17.0 Changes
- Better internal handling of timeouts that ensures cleanup of resources on the callee side
- Added
put_and_delete_multi/3
to atomically put and delete entries - Added
put_new/3
to put an entry only if the key does not exist yet - More efficient implementation of
put_multi/2
anddelete_multi/2
- Function
get_multi/2
does not block writers - Fix race condition during compaction
- Function
get_and_update/3
avoids unnecessary disk writes (including the transaction header) when the value is unchanged - Remove caller timeout on
put_and_delete_multi/3
andput_multi/2
, consistently with the other functions. - Remove default GenServer timeouts
- Fix process (and file descriptor) leak upon compaction
- Fix
cubdb_file?/1
regexp, making it stricter