[][src]Module rdms::mvcc

Module mvcc implement Multi-Version-Concurrency-Control variant of Llrb.

Mvcc type allow concurrent read and write access at API level, while behind the scenes, all write-operations are serialized into single thread, but the key difference is that Mvcc index allow concurrent-reads without using locks. To serialize concurrent writes Mvcc uses a spin-lock implementation that can be configured to yield or spin while waiting for the lock.

LSM mode: Mvcc index can support log-structured-merge while mutating the tree. In simple terms, this means that nothing shall be over-written in the tree and all the mutations for the same key shall be preserved until they are purged.

Possible ways to configure Mvcc:

spinlatch, relevant only in multi-threaded context. Calling set_spinlatch() with true will have the calling thread to spin while waiting to acquire the lock. Calling it with false will have the calling thread to yield to OS scheduler while waiting to acquire the lock.

seqno, application can set the beginning sequence number before ingesting data into the index.

Structs

Iter

Full table scan type for both Llrb and Mvcc index.

IterFullScan

Piece-wise full table scan type for both Llrb and Mvcc index.

Mvcc

A Mvcc variant of LLRB index for concurrent readers, serialized writers.

MvccReader

Read handle into Mvcc index, that implements both Send and Sync.

MvccWriter

Write handle into Mvcc index, that implements both Send and Sync.

Range

Range scan between a lower-bound and higher-bound for bot Llrb and Mvcc index.

Reverse

Reverse range scan between a higher-bound and lower-bound for both Llrb and Mvcc index.