pub struct LogicalWalSpool { /* private fields */ }Expand description
Durable append-only logical WAL spool kept beside the main .rdb file.
This is not the storage-engine WAL; it is a structured replication/PITR log.
Implementations§
Source§impl LogicalWalSpool
impl LogicalWalSpool
pub fn path_for(data_path: &Path) -> PathBuf
pub fn open(data_path: &Path) -> Result<Self>
pub fn append(&self, lsn: u64, data: &[u8]) -> Result<()>
Sourcepub fn append_with_timestamp(
&self,
lsn: u64,
timestamp_ms: u64,
data: &[u8],
) -> Result<()>
pub fn append_with_timestamp( &self, lsn: u64, timestamp_ms: u64, data: &[u8], ) -> Result<()>
Append a record with an explicit framing timestamp. Used in
tests to produce deterministic timestamps; production callers
should use append.
pub fn read_since( &self, since_lsn: u64, max_count: usize, ) -> Result<Vec<(u64, Vec<u8>)>>
pub fn current_lsn(&self) -> u64
pub fn oldest_lsn(&self) -> Result<Option<u64>>
pub fn prune_through(&self, upto_lsn: u64) -> Result<()>
Auto Trait Implementations§
impl !Freeze for LogicalWalSpool
impl RefUnwindSafe for LogicalWalSpool
impl Send for LogicalWalSpool
impl Sync for LogicalWalSpool
impl Unpin for LogicalWalSpool
impl UnsafeUnpin for LogicalWalSpool
impl UnwindSafe for LogicalWalSpool
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request