pub trait ReadWriteSetInferencer: Sync {
    type T: Transaction;

    // Required methods
    fn infer_reads(
        &self,
        txn: &Self::T
    ) -> Result<Vec<<Self::T as Transaction>::Key>>;
    fn infer_writes(
        &self,
        txn: &Self::T
    ) -> Result<Vec<<Self::T as Transaction>::Key>>;
}
Expand description

Trait for inferencing the read and write set of a transaction.

Required Associated Types§

source

type T: Transaction

Type of transaction and its associated key.

Required Methods§

source

fn infer_reads( &self, txn: &Self::T ) -> Result<Vec<<Self::T as Transaction>::Key>>

Get the read set of a transaction. Read set estimation is used simply to improve the performance by exposing the read dependencies. Imprecise estimation won’t cause execution failure.

source

fn infer_writes( &self, txn: &Self::T ) -> Result<Vec<<Self::T as Transaction>::Key>>

Get the write set of a transaction. Write set estimation is crucial to the execution correctness as there’s no way to resolve read-after-write conflict where a write is unexpected. Thus we require write to be an over approximation for now.

Implementors§

source§

impl<K, V> ReadWriteSetInferencer for ImpreciseInferencer<K, V>where K: PartialOrd + Send + Sync + Clone + Hash + Eq + 'static, V: Send + Sync + Debug + Clone + 'static,

§

type T = Transaction<K, V>

source§

impl<K, V> ReadWriteSetInferencer for Inferencer<K, V>where K: PartialOrd + Send + Sync + Clone + Hash + Eq + 'static, V: Send + Sync + Debug + Clone + 'static,

§

type T = Transaction<K, V>