Trait diem_parallel_executor::task::ReadWriteSetInferencer [−][src]
pub trait ReadWriteSetInferencer: Sync {
type T: Transaction;
fn infer_reads_writes(
&self,
txn: &Self::T
) -> Result<Accesses<<Self::T as Transaction>::Key>>;
}Expand description
Trait for inferencing the read and write set of a transaction.
Associated Types
type T: Transaction
type T: Transaction
Type of transaction and its associated key.
Required methods
fn infer_reads_writes(
&self,
txn: &Self::T
) -> Result<Accesses<<Self::T as Transaction>::Key>>
fn infer_reads_writes(
&self,
txn: &Self::T
) -> Result<Accesses<<Self::T as Transaction>::Key>>
Get the read and write 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.
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.