Crate crossbeam_skiplist_mvcc

Crate crossbeam_skiplist_mvcc 

Source
Expand description

crossbeam-skiplist-mvcc

Support MVCC (Multiple Version Concurrent Control) for crossbeam-skiplist.

github LoC Build codecov

docs.rs crates.io crates.io license

§Introducation

Support MVCC (Multiple Version Concurrent Control) for crossbeam-skiplist.

There are two kinds of multiple version concurrent control SkipMap:

  1. nested::SkipMap

    The inner is SkipMap<K, SkipMap<u64, Option<V>>>.

    1. Pros
      1. Fast latest iterators, fast read and write performance
    2. Cons:
      1. Once a key is inserted into the outer SkipMap, the compaction can only remove the values in the inner SkipMap, this key cannot be removed any more. So, this may lead to high memory usage.
  2. flatten::SkipMap

    The inner is SkipMap<Key<K>, Option<V>>.

    1. Pros
      1. Keys can be fully removed through compaction.
    2. Cons
      1. Unlike nested::SkipMap, flatten::SkipMap will store the same key multiple times, so this may lead to high memory usage.
      2. Insertion, querying, and latest iterators may slower than nested::SkipMap

§Installation

[dependencies]
crossbeam_skiplist_mvcc = "0.3"
§License

crossbeam-skiplist-mvcc is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2024 Al Liu.

Modules§

equivalentor
Traits for key comparison in maps.
error
Error types for this crate.
flatten
A multiple version ordered map based on a lock-free skip list. See SkipMap.
nested
A multiple version ordered map based on a lock-free skip list. See SkipMap.
state
State for entries

Structs§

Ascend
Ascend is a comparator that compares items in ascending order.
Descend
Descend is a comparator that compares byte slices in ascending order.

Traits§

Transfer
Transfer the value from V to Self::To.