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§
sourcetype T: Transaction
type T: Transaction
Type of transaction and its associated key.
Required Methods§
sourcefn infer_reads(
&self,
txn: &Self::T
) -> Result<Vec<<Self::T as Transaction>::Key>>
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.
sourcefn infer_writes(
&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>>
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.