pub enum StoreError {
Show 16 variants
Io(Error),
PageCorrupted {
page_id: PageId,
expected: u32,
actual: u32,
},
KeyTooLong {
len: usize,
max: usize,
},
ValueTooLarge {
len: usize,
max: usize,
},
InvalidPageMagic {
expected: u32,
actual: u32,
},
UnsupportedPageVersion(u8),
InvalidSuperblockMagic,
SuperblockCorrupted,
NonSequentialBatch {
expected: u64,
actual: u64,
},
TableNotFound(TableId),
PageOverflow {
needed: usize,
available: usize,
},
EntryTooLarge {
key: Key,
entry_size: usize,
page_budget: usize,
},
BTreeInvariant(String),
DuplicateKey(Key),
PageNotFound(PageId),
ReadOnly,
}Expand description
Errors that can occur during store operations.
Variants§
Io(Error)
Filesystem I/O error.
PageCorrupted
Page CRC32 checksum mismatch - data corruption detected.
KeyTooLong
Key exceeds maximum allowed length.
ValueTooLarge
Value exceeds maximum size that fits in a page.
InvalidPageMagic
Page has invalid magic bytes.
UnsupportedPageVersion(u8)
Page has unsupported version.
InvalidSuperblockMagic
Superblock has invalid magic bytes.
SuperblockCorrupted
Superblock CRC mismatch.
NonSequentialBatch
Batch position is not sequential.
TableNotFound(TableId)
Table not found.
PageOverflow
Page overflow - not enough space for insert.
EntryTooLarge
A single B+tree leaf entry (one key + its version chain) has
grown larger than what fits on a page, so splitting the leaf
can’t help. The typical cause is repeated upsert-in-place on the
same primary key — every overwrite appends a version to the
MVCC chain, so a hot row that’s updated dozens of times
accumulates a chain whose serialized_size exceeds the page
byte budget.
v0.9.0 surfaced this as the generic
StoreError::PageOverflow inside to_page, which left
callers with no actionable signal. v0.9.1 promotes it to a
typed variant carrying the offending key + sizes so the SDK
can render a clear error and the operator can pinpoint the hot
row. Proper version-chain compaction driven by a retention
horizon is v0.10.0 work.
Fields
BTreeInvariant(String)
Internal B+tree invariant violation.
DuplicateKey(Key)
Duplicate key in batch.
PageNotFound(PageId)
Page not found in cache or on disk.
ReadOnly
Store is read-only.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()