struct MemInner {
log: Vec<u8>,
checkpoint: Option<Vec<u8>>,
sentinel: Option<Vec<u8>>,
fences: BTreeMap<TxnId, u64>,
tear_next_write: Option<usize>,
tear_write_containing: Option<Vec<u8>>,
torn: bool,
fail_next_checkpoint: bool,
enospc: bool,
unsynced: Vec<(usize, Vec<u8>)>,
}Fields§
§log: Vec<u8>§checkpoint: Option<Vec<u8>>§sentinel: Option<Vec<u8>>§fences: BTreeMap<TxnId, u64>§tear_next_write: Option<usize>Fault injection: the next log write stores only this many bytes, then fails.
tear_write_containing: Option<Vec<u8>>Fault injection: the next log write whose bytes contain this stores half of them, then fails; and whether that has happened.
torn: bool§fail_next_checkpoint: boolFault injection: the next checkpoint write fails without replacing the old one.
enospc: boolFault injection: log writes fail with ENOSPC.
unsynced: Vec<(usize, Vec<u8>)>P21 (§12 “fsync’d”, §17a): log bytes written since the last sync,
as (offset, the bytes there before), oldest first. sync makes the
writes durable by forgetting them; crash undoes them. The
checkpoint, sentinel and fences are replaced atomically and durably
on write (Store’s contract), so they are not buffered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemInner
impl RefUnwindSafe for MemInner
impl Send for MemInner
impl Sync for MemInner
impl Unpin for MemInner
impl UnsafeUnpin for MemInner
impl UnwindSafe for MemInner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more