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.
InvalidHeader
Invalid file header.
VersionMismatch
Version mismatch between log file and current version.
EnvironmentLocked(String)
Environment is locked by another process.
InvalidDirectory(String)
Invalid environment directory.
WriteFailed(String)
Log write failed.
InvalidEntryType
Invalid entry type number.
InvalidEntrySize
Invalid entry size.
UnexpectedEof
Unexpected end of data.
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.
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, ...).
Internal(String)
Internal consistency error.
Trait Implementations§
Source§impl Debug for NoxuLogError
impl Debug for NoxuLogError
Source§impl Display for NoxuLogError
impl Display for NoxuLogError
Source§impl Error for NoxuLogError
impl Error for NoxuLogError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()