A lock-free B+ tree based on sled’s internal index structure, but supporting richer Rust types as keys and values than raw bytes.
This structure supports atomic compare and swap operations with the
ConcurrentMap allows users to tune the tree fan-out (
and the underlying memory reclamation granularity (
for achieving desired performance properties. The defaults are pretty good
for most use cases but if you want to squeeze every bit of performance out
for your particular workload, tweaking them based on realistic measurements
may be beneficial. See the
ConcurrentMap docs for more details.
If you want to use a custom key type, you must
allowing the left-most side of the tree to be
created before inserting any data. If you wish
to perform scans in reverse lexicographical order,
you may instead implement
Maximum for your key
type and use
This is an ordered data structure, and supports very high throughput iteration over lexicographically sorted ranges of values. If you are looking for simple point operation performance, you may find a better option among one of the many concurrent hashmap implementations that are floating around.
- Error type for the
- A lock-free B+ tree.
- An iterator over a
ConcurrentMap. Note that this is not an atomic snapshot of the overall shared state, but it will contain any data that existed before the iterator was created.
- Trait for types for which a maximum possible value exists.
- Trait for types for which a minimum possible value exists.