#mvcc #skip-list #crossbeam #data-structures #crossbeam-skiplist

no-std crossbeam-skiplist-mvcc

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

6 releases

0.2.2 Nov 7, 2024
0.2.1 Nov 5, 2024
0.1.2 Nov 1, 2024
0.1.1 Oct 22, 2024

#177 in Concurrency

Download history 468/week @ 2024-10-19 241/week @ 2024-10-26 730/week @ 2024-11-02 139/week @ 2024-11-09

1,578 downloads per month
Used in orderwal

MIT/Apache

105KB
2.5K SLoC

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.1"

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.

Dependencies

~385KB