Enum mkit::db::Cutoff[][src]

pub enum Cutoff {
    Mono,
    Lsm(Bound<u64>),
    Tombstone(Bound<u64>),
}

Cutoff is enumerated type to describe compaction behaviour.

All entries, or its versions, older than Cutoff is skipped while compaction. The behavior is captured below,

deduplication

This is basically applicable for snapshots that don’t have to preserve older versions or deleted entries.

lsm-compaction

This is applicable for database index that store their index as multi-level snapshots, similar to leveldb. Most of the lsm-based-storage will have their root snapshot as the oldest and only source of truth, but this is not possible for distributed index that ends up with multiple truths across different nodes. To facilitate such designs, in lsm mode, even the root level at any given node, can retain older versions upto a specified seqno, that seqno is computed through eventual consistency.

tombstone-compaction

Tombstone compaction is similar to lsm-compaction with one main difference. When application logic issue tombstone-compaction only deleted entries that are older than specified seqno will be purged.

Variants

Mono

Deduplicating behavior.

Lsm(Bound<u64>)

Lsm compaction.

Tombstone(Bound<u64>)

Tombstone compaction.

Trait Implementations

impl Clone for Cutoff[src]

impl Copy for Cutoff[src]

impl Debug for Cutoff[src]

impl PartialEq<Cutoff> for Cutoff[src]

impl StructuralPartialEq for Cutoff[src]

Auto Trait Implementations

impl RefUnwindSafe for Cutoff

impl Send for Cutoff

impl Sync for Cutoff

impl Unpin for Cutoff

impl UnwindSafe for Cutoff

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.