pub enum RecoveryState {
CleanShutdown,
DirtyShutdown,
PartialCheckpoint,
CorruptWAL,
CorruptGraphFile,
Unrecoverable,
}Expand description
Explicit recovery state determined from existing signals
Variants§
CleanShutdown
No recovery needed - clean shutdown detected
DirtyShutdown
Dirty WAL with uncommitted transactions - requires recovery
PartialCheckpoint
Partial checkpoint in progress - resume checkpoint operation
CorruptWAL
WAL file is corrupted - cannot recover
CorruptGraphFile
Graph file is corrupted - cannot recover
Unrecoverable
Both WAL and graph file corrupted - unrecoverable
Implementations§
Source§impl RecoveryState
impl RecoveryState
Sourcepub fn determine_from_files(
wal_exists: bool,
graph_file_exists: bool,
checkpoint_exists: bool,
wal_header: Option<&V2WALHeader>,
_graph_file_size: Option<u64>,
) -> NativeResult<Self>
pub fn determine_from_files( wal_exists: bool, graph_file_exists: bool, checkpoint_exists: bool, wal_header: Option<&V2WALHeader>, _graph_file_size: Option<u64>, ) -> NativeResult<Self>
Determine recovery state from existing files and headers
This method uses ONLY existing signals from the files:
- WAL header magic, version, and LSN relationships
- Graph file existence and header validation
- Checkpoint file existence and LSN ranges
No new heuristics or assumptions are introduced.
Sourcepub fn requires_recovery(&self) -> bool
pub fn requires_recovery(&self) -> bool
Check if recovery is required
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if recovery is possible
Sourcepub fn severity(&self) -> RecoverySeverity
pub fn severity(&self) -> RecoverySeverity
Get recovery severity level for diagnostics
Trait Implementations§
Source§impl Clone for RecoveryState
impl Clone for RecoveryState
Source§fn clone(&self) -> RecoveryState
fn clone(&self) -> RecoveryState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecoveryState
impl Debug for RecoveryState
Source§impl<'de> Deserialize<'de> for RecoveryState
impl<'de> Deserialize<'de> for RecoveryState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RecoveryState
impl Display for RecoveryState
Source§impl Ord for RecoveryState
impl Ord for RecoveryState
Source§fn cmp(&self, other: &RecoveryState) -> Ordering
fn cmp(&self, other: &RecoveryState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RecoveryState
impl PartialEq for RecoveryState
Source§impl PartialOrd for RecoveryState
impl PartialOrd for RecoveryState
Source§impl Serialize for RecoveryState
impl Serialize for RecoveryState
impl Copy for RecoveryState
impl Eq for RecoveryState
impl StructuralPartialEq for RecoveryState
Auto Trait Implementations§
impl Freeze for RecoveryState
impl RefUnwindSafe for RecoveryState
impl Send for RecoveryState
impl Sync for RecoveryState
impl Unpin for RecoveryState
impl UnwindSafe for RecoveryState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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