pub enum SegmentError {
CorruptFile {
detail: String,
},
InvalidMagic,
ChecksumMismatch {
expected: u32,
actual: u32,
},
UnsupportedVersion {
version: u16,
detail: String,
},
Io(Error),
Encoding(EncodingError),
AlreadyFinalized,
EmptySegment,
RowGroupOutOfRange {
index: usize,
max: usize,
},
MissingEncryptionKey {
column: String,
key_id: String,
},
InvalidConfiguration {
detail: String,
},
ColumnNotFound {
name: String,
},
}Expand description
Errors that can occur during segment operations.
Variants§
CorruptFile
The segment file is corrupt or has an invalid format.
InvalidMagic
Invalid magic bytes in header or footer.
ChecksumMismatch
CRC32c checksum mismatch.
UnsupportedVersion
The segment belongs to a different format generation.
The message is built by crate::format::version_mismatch, so every
durable format says the same thing in the same words — and names the
remedy rather than printing a bare number, which is what this used to
do.
Fields
Io(Error)
An I/O error occurred.
Encoding(EncodingError)
An encoding error occurred.
AlreadyFinalized
The segment writer has already been finalized.
EmptySegment
No data has been written to the segment.
RowGroupOutOfRange
Row group index is out of range.
MissingEncryptionKey
Column not found. An encrypted column cannot be read because its key is not available.
Not CorruptFile, which is what this used to
be: nothing is wrong with the bytes. The deployment is missing a key,
and the two have completely different next steps — one is “restore
from a backup”, the other is “set the environment variable”. The
commonest way to arrive here is restoring an encrypted backup onto a
machine the key was never given to.
Fields
InvalidConfiguration
The writer was asked for something the format cannot honestly do.
Distinct from CorruptFile: nothing is wrong
with the data, the configuration is wrong — declaring a tag column
encrypted, for instance, which the format would accept and which
would publish the value in the sidecar beside it.
ColumnNotFound
A requested column is not in the segment.
Trait Implementations§
Source§impl Debug for SegmentError
impl Debug for SegmentError
Source§impl Display for SegmentError
impl Display for SegmentError
Source§impl Error for SegmentError
impl Error for SegmentError
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<EncodingError> for SegmentError
impl From<EncodingError> for SegmentError
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Source§impl From<Error> for SegmentError
impl From<Error> for SegmentError
Source§impl From<SegmentError> for CacheError
impl From<SegmentError> for CacheError
Source§fn from(source: SegmentError) -> Self
fn from(source: SegmentError) -> Self
Source§impl From<SegmentError> for CompactionError
impl From<SegmentError> for CompactionError
Source§fn from(source: SegmentError) -> Self
fn from(source: SegmentError) -> Self
Source§impl From<SegmentError> for MemtableError
impl From<SegmentError> for MemtableError
Source§fn from(source: SegmentError) -> Self
fn from(source: SegmentError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SegmentError
impl !UnwindSafe for SegmentError
impl Freeze for SegmentError
impl Send for SegmentError
impl Sync for SegmentError
impl Unpin for SegmentError
impl UnsafeUnpin for SegmentError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more