pub struct PerCoreRecoveryManager { /* private fields */ }Expand description
Recovery manager for per-core WAL segments.
Implementations§
Source§impl PerCoreRecoveryManager
impl PerCoreRecoveryManager
Sourcepub fn new(
wal_config: PerCoreWalConfig,
recovery_config: RecoveryConfig,
) -> Self
pub fn new( wal_config: PerCoreWalConfig, recovery_config: RecoveryConfig, ) -> Self
Creates a new per-core recovery manager.
Sourcepub fn recover(&self) -> Result<PerCoreRecoveredState, PerCoreWalError>
pub fn recover(&self) -> Result<PerCoreRecoveredState, PerCoreWalError>
Sourcepub fn recover_from_positions(
&self,
positions: &[u64],
) -> Result<PerCoreRecoveredState, PerCoreWalError>
pub fn recover_from_positions( &self, positions: &[u64], ) -> Result<PerCoreRecoveredState, PerCoreWalError>
Recovers state using checkpoint-stored per-core WAL positions.
If positions matches num_cores, replay starts from those positions
instead of the beginning. On mismatch, falls back to full replay.
§Errors
Returns an error if checkpoint recovery or WAL replay fails.
Sourcepub fn recover_wal_only(&self) -> Result<Vec<PerCoreWalEntry>, PerCoreWalError>
pub fn recover_wal_only(&self) -> Result<Vec<PerCoreWalEntry>, PerCoreWalError>
Recovers state from WAL segments only (no checkpoint).
§Errors
Returns an error if reading segments fails.
Sourcepub fn repair_all_segments(&self) -> Result<Vec<u64>, PerCoreWalError>
pub fn repair_all_segments(&self) -> Result<Vec<u64>, PerCoreWalError>
Sourcepub fn segment_stats(&self) -> Result<Vec<SegmentStats>, PerCoreWalError>
pub fn segment_stats(&self) -> Result<Vec<SegmentStats>, PerCoreWalError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerCoreRecoveryManager
impl RefUnwindSafe for PerCoreRecoveryManager
impl Send for PerCoreRecoveryManager
impl Sync for PerCoreRecoveryManager
impl Unpin for PerCoreRecoveryManager
impl UnsafeUnpin for PerCoreRecoveryManager
impl UnwindSafe for PerCoreRecoveryManager
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.