the champagne of beta embedded databases
Transactional
is now implemented for
[&Tree]
and [Tree]
so you can avoid the
previous friction of using tuples, as was
necessary previously.Subscriber
now implements Future
(non-fused)
so prefix watching may now be iterated over via
while let Some(event) = (&mut subscriber).await {}
IVec
where it
works similarly to a Cow
, making a private copy
if the backing Arc
's strong count is not 1.doc
module
exported in lib.segment_size
from 8m to 512k.
This will result in far smaller database files due
to better file garbage collection granularity.Config
options that will be
removed over time.transaction
module away from
the library root to keep the top level docs clean.TransactionalTree::apply_batch
now accepts
its argument by reference instead of by value.Event
has been changed to make the inner fields
named instead of anonymous.sync_file_range
on linux instead
of a full fsync for most writes.rio
crateu64
. This dramatically reduces the written
bytes for databases that store small keys and
values.Config::open
method has been added to give
Config
a similar feel to std's fs::OpenOptions
.
The Config::build
and Db::start
methods are
now deprecated in favor of calling Config::open
directlychecksum
method has been added to Tree and Db
for use in verifying backups and migrations.TransactionError::Abort
variant has had
a generic member added that can be returned
as a way to return information from a
manually-aborted transaction. An abort
helper
function has been added to reduce the boiler-
plate required to return aborted results.ConfigBuilder
structure has been removed
in favor of a simplified Config
structure
with the same functionality.cas
method is deprecated in favor of the new
compare_and_swap
method which now returns the
proposed value that failed to be applied.io_buf_size
configurable renamed to
segment_size
.io_buf_size
configurable method has been
removed from ConfigBuilder. This can be manually
set by setting the attribute directly on the
ConfigBuilder, but this is discouraged.
Additionally, this must now be a power of 2.page_consolidation_threshold
method has been
removed from ConfigBuilder, and this is now
a constant of 10.Event::Set
has been renamed to Event::Insert
and
Event::Del
has been renamed to Event::Remove
. These
names better align with the methods of BTreeMap from
the standard library.flush_async
has been added to perform time-intensive
flushing in an asynchronous manner, returning a Future.Tree::transaction
and
perform reads, writes, and deletes within a provided
closure with a TransactionalTree
argument. This
closure may be called multiple times if the transaction
encounters a concurrent update in the process of its
execution. Transactions may also be used on tuples of
Tree
objects, where the closure will then be
parameterized on TransactionalTree
instances providing
access to each of the provided Tree
instances. This
allows you to atomically read and modify multiple
Tree
instances in a single atomic operation.
These transactions are serializable, fully ACID,
and optimistic.Tree::apply_batch
allows you to apply a Batch
TransactionalTree::apply_batch
allow you to
apply a Batch
from within a transaction.Tree::batch
has been removed. Now you can directly
create a Batch
with Batch::default()
and then apply
it to a Tree
with Tree::apply_batch
or during a
transaction using TransactionalTree::apply_batch
.
This facilitates multi-Tree
batches via transactions.Event::Merge
has been removed, and Tree::merge
will
now send a complete Event::Set
item to be distributed
to all listening subscribers.This release brings big improvements to the underlying GC system for keeping file sizes under control, as well as some optimizations for the writepath.
This release includes a large number of internal and external API cleanups. Some internal CAS-like operations will retry automatically when they fail due to changes that do not impact causality, like rewriting the same page to a new location. When CAS-like operations fail, they now return the new value that was created to insert in the first place, removing several double allocations. Lots of performance improvements.