pub enum Error {
Io {
path: PathBuf,
source: Error,
},
Arrow(ArrowError),
DictionaryFull(&'static str),
BadMagic {
path: PathBuf,
},
BadChecksum {
path: PathBuf,
expected: u32,
actual: u32,
},
MissingMetadata {
path: PathBuf,
key: &'static str,
},
Undecodable {
path: PathBuf,
source: ArrowError,
},
NetworkFilesystem {
path: PathBuf,
fs: String,
},
NotWritable {
path: PathBuf,
source: Error,
},
WalFrameTooLarge {
len: usize,
max: u32,
},
WalCorrupt {
path: PathBuf,
why: &'static str,
},
WalVersion {
path: PathBuf,
found: u16,
expected: u16,
},
}Variants§
Io
Arrow(ArrowError)
DictionaryFull(&'static str)
A dictionary key space filled up mid-append. The caller’s response is to seal the current block and retry into a fresh one, never to fail the RPC.
BadMagic
BadChecksum
MissingMetadata
Undecodable
Every way arrow-rs can refuse a block body: a misaligned buffer, a
dictionary that will not decode, a ZSTD frame that will not decompress.
One variant because they arrive through one call and the source is
what says which — and named for the refusal rather than for alignment,
because a headline of “buffers are not aligned” over a corrupt ZSTD
frame sends the reader to the wrong half of the file at 3am.
Misalignment is the case worth naming in the message anyway: it is the
one Mira opts into detecting, with with_require_alignment(true). The
arrow-rs default is to silently memcpy the whole body out of the
mapping, turning a zero-copy read into a full allocation with no signal.
NetworkFilesystem
The data directory is on a filesystem Mira’s read path cannot survive.
See block::check_filesystem.
NotWritable
The data directory exists but cannot be written to. See
block::check_writable.
WalFrameTooLarge
An export bigger than the WAL will frame. Distinct from a corrupt length on read: this one is the caller’s fault and is answerable with a 4xx, so it must not be confused with the file being damaged.
WalCorrupt
A WAL frame did not survive the trip. Expected exactly once, at the
tail of the last segment after a crash; anywhere else it is damage.
See wal::Wal::replay for why this ends a segment rather than the
process.
WalVersion
A WAL segment written by a different build. Refused rather than guessed at, for the same reason a block with an unknown format version is: a frame layout is not self-describing enough to parse hopefully.
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()
Source§impl From<ArrowError> for Error
impl From<ArrowError> for Error
Source§fn from(source: ArrowError) -> Self
fn from(source: ArrowError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request