pub enum LogError {
Io(Error),
PartialBatch {
segment: i64,
file_offset: u64,
},
CrcMismatch {
segment: i64,
file_offset: u64,
expected: u32,
computed: u32,
},
OffsetTooLow {
requested: i64,
log_start: i64,
},
Records(RecordsError),
BadSegmentName(String),
OffsetMismatch {
expected: i64,
actual: i64,
},
Corrupt(String),
InvalidArgument(String),
}Variants§
Io(Error)
An I/O operation against the filesystem failed.
PartialBatch
A partial batch was found at the tail of a .log file during
recovery — the trailing bytes will be truncated to the last
cleanly decoded batch.
Fields
CrcMismatch
A batch’s stored CRC did not match the one computed over its bytes.
Fields
OffsetTooLow
A caller requested an offset below Log::log_start_offset.
Records(RecordsError)
Encoding/decoding of a RecordBatch failed.
BadSegmentName(String)
A segment filename couldn’t be parsed (e.g., wrong length, not all digits).
OffsetMismatch
A caller supplied an explicit offset to Log::append_at
that did not match the log’s current end offset. Replication paths use
this to detect divergence between leader-assigned offsets and the local
log’s expected next offset.
Fields
Corrupt(String)
A log file (e.g., .txnindex) is corrupt: wrong size, bad checksum, etc.
InvalidArgument(String)
A caller supplied an invalid argument.
Trait Implementations§
Source§impl Error for LogError
impl Error for LogError
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()