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 append_with_term_and_timestamp( &self, term: u64, lsn: u64, timestamp_ms: u64, data: &[u8], ) -> Result<()>
pub fn append_with_term_epoch_and_timestamp( &self, term: u64, ownership_epoch: Option<u64>, lsn: u64, timestamp_ms: u64, data: &[u8], ) -> Result<()>
pub fn read_since( &self, since_lsn: u64, max_count: usize, ) -> Result<Vec<(u64, Vec<u8>)>>
pub fn read_since_bounded( &self, since_lsn: u64, max_count: usize, max_payload_bytes: 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 Forget for LogicalWalSpool
impl Move for LogicalWalSpool
impl RefUnwindSafe for LogicalWalSpoolwhere
Mutex<LogicalWalSpoolState>: RefUnwindSafe,
impl Send for LogicalWalSpool
impl Sync for LogicalWalSpool
impl Unpin for LogicalWalSpool
impl UnsafeUnpin for LogicalWalSpoolwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
PhantomData<(u64, u64)>: UnsafeUnpin,
impl UnwindSafe for LogicalWalSpool
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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