pub struct WalTicket { /* private fields */ }Expand description
Ticket returned by the buffered write path; wait() blocks
until the record it covers is durable (or the WAL is
poisoned). Cheap to move across threads.
Implementations§
Source§impl WalTicket
impl WalTicket
Sourcepub fn wait(&self) -> Result<(), EngineError>
pub fn wait(&self) -> Result<(), EngineError>
Block until the record this ticket covers is durable.
Under SPG_SYNCHRONOUS_COMMIT=off this returns
immediately — the background flusher (or the next
checkpoint / clean shutdown) makes the record durable
within SPG_WAL_WRITER_DELAY_MS. Same contract as PG’s
synchronous_commit = off.
§Errors
Surfaces the leader’s IO error if the batch flush failed (the WAL is then poisoned for all subsequent writes).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalTicket
impl RefUnwindSafe for WalTicket
impl Send for WalTicket
impl Sync for WalTicket
impl Unpin for WalTicket
impl UnsafeUnpin for WalTicket
impl UnwindSafe for WalTicket
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