pub enum Error {
Io(Error),
BadMeta(String),
NotRetained {
seq: u64,
first: u64,
},
BeyondHead {
seq: u64,
head: u64,
},
Corrupt {
path: PathBuf,
offset: u64,
what: &'static str,
},
Released(PathBuf),
OutOfOrder {
got: u64,
expected: u64,
},
Follower,
Unexpected(PathBuf),
Poisoned {
dir: PathBuf,
cause: String,
},
}Expand description
Errors of the log.
Variants§
Io(Error)
I/O.
BadMeta(String)
A frame’s meta did not parse.
NotRetained
The requested sequence is below what the log retains.
BeyondHead
The requested sequence is above the head.
Corrupt
A frame in the middle of a segment (not the tail) is corrupt.
Released(PathBuf)
The log’s files are RELEASED (Log::release): the data set under it is being grown
and unmounted, so nothing may write until Log::reacquire.
OutOfOrder
An append was asked to start at a sequence that is not head + 1.
Follower
This log belongs to a TWIN: it holds the primary’s numbers and originates none. A local mutation on a twin is refused here, loudly, rather than stealing a sequence number from the primary.
Unexpected(PathBuf)
The segment directory holds a file the layout does not describe.
Poisoned
The log is POISONED (stinky rows 3 and 6, 2026-10-10): a frame’s fdatasync failed,
or the cut of a half-written frame did. After a failed fsync the kernel may have dropped
the dirty pages and the NEXT fsync succeeds without them (fsyncgate) — a frame its writer
was told had failed would then be published by the next leader and applied by the twin.
After a failed cut the next frame would land behind garbage. So nothing more is written:
every append refuses with this until the log is reopened, which recovers from the last
durable frame.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()