pub struct WriteScratch { /* private fields */ }Expand description
Per-attempt write buffer. The shared Graph is not mutated until apply_redo.
workspace is not cloned. A clone keeps the created entities and takes
its own reservation once, at clone time, so dropping the original
releases the original reservation once.
Implementations§
Source§impl WriteScratch
impl WriteScratch
pub fn new( snapshot_ts: u64, node_id_alloc: Arc<AtomicU64>, rel_id_alloc: Arc<AtomicU64>, ) -> Self
pub fn snapshot_ts(&self) -> u64
pub fn take_redo(&mut self) -> Vec<RedoOp>
Sourcepub fn take_redo_with_workspace(
&mut self,
) -> Result<(Vec<RedoOp>, WorkspaceCharge)>
pub fn take_redo_with_workspace( &mut self, ) -> Result<(Vec<RedoOp>, WorkspaceCharge)>
Drain the redo and hand its live workspace reservation to the caller.
The scratch’s execution allocation is still represented by the redo vector while WAL commit serializes and applies it. The caller holds this charge through that boundary, then drops it once the commit has either been rejected or acknowledged.
Trait Implementations§
Auto Trait Implementations§
impl Forget for WriteScratch
impl Freeze for WriteScratch
impl Move for WriteScratch
impl RefUnwindSafe for WriteScratch
impl Send for WriteScratch
impl Sync for WriteScratch
impl Unpin for WriteScratch
impl UnsafeUnpin for WriteScratch
impl UnwindSafe for WriteScratch
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