Skip to main content

NoxuLogError

Enum NoxuLogError 

Source
pub enum NoxuLogError {
Show 17 variants Io(Error), FileNotFound(String), Checksum { lsn: Lsn, message: String, }, InvalidHeader { file_num: u32, message: String, }, VersionMismatch { expected: u32, found: u32, file_num: u32, }, EnvironmentLocked(String), InvalidDirectory(String), WriteFailed(String), InvalidEntryType { type_num: u8, lsn: Lsn, }, InvalidEntrySize { size: i32, lsn: Lsn, }, UnexpectedEof { lsn: Lsn, message: String, }, BufferOverflow(String), LogCorrupt(String), HeaderChecksumMismatch { file_num: u32, expected: u32, found: u32, }, LatchTimeout(String), FoundCommittedTxn { corrupt_lsn: Lsn, commit_lsn: Lsn, }, Internal(String),
}
Expand description

Errors that can occur in the log layer.

Variants§

§

Io(Error)

I/O error during file operations.

§

FileNotFound(String)

File not found (specific log file).

§

Checksum

Checksum validation failed.

Fields

§lsn: Lsn
§message: String
§

InvalidHeader

Invalid file header.

Fields

§file_num: u32
§message: String
§

VersionMismatch

Version mismatch between log file and current version.

Fields

§expected: u32
§found: u32
§file_num: u32
§

EnvironmentLocked(String)

Environment is locked by another process.

§

InvalidDirectory(String)

Invalid environment directory.

§

WriteFailed(String)

Log write failed.

§

InvalidEntryType

Invalid entry type number.

Fields

§type_num: u8
§lsn: Lsn
§

InvalidEntrySize

Invalid entry size.

Fields

§size: i32
§lsn: Lsn
§

UnexpectedEof

Unexpected end of data.

Fields

§lsn: Lsn
§message: String
§

BufferOverflow(String)

Buffer overflow.

§

LogCorrupt(String)

Log corruption detected.

§

HeaderChecksumMismatch

File header CRC32 checksum mismatch (torn header write).

Returned when a v3 file header is opened and the trailing 4-byte CRC32 over bytes [0..32] does not match the stored value. A torn header write can corrupt file_number or last_entry_in_prev_file while leaving magic + version intact; this error makes such corruption detectable rather than silently yielding wrong recovery metadata.

Fields

§file_num: u32
§expected: u32
§found: u32
§

LatchTimeout(String)

Latch acquisition timed out (maps to EnvironmentFailure/LatchTimeout).

§

FoundCommittedTxn

A committed transaction was found AFTER a mid-file corruption point.

Surfaced by crate::last_file_reader::LastFileReader during end-of-log discovery when the haltOnCommitAfterChecksumException param is enabled and a TxnCommit entry exists past a checksum failure. This distinguishes real media corruption (with committed data beyond it) from a benign torn-tail write — recovery must REFUSE to silently truncate. Recovery maps this to the env-invalidating EnvironmentFailureReason::FoundCommittedTxn.

Faithful to JE LastFileReader.readNextEntry/findCommittedTxn (LastFileReader.java:313/394, [#18307]) which throws EnvironmentFailureException(FOUND_COMMITTED_TXN, ...).

Fields

§corrupt_lsn: Lsn
§commit_lsn: Lsn
§

Internal(String)

Internal consistency error.

Trait Implementations§

Source§

impl Debug for NoxuLogError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NoxuLogError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for NoxuLogError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for NoxuLogError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.