pub enum TabletError {
Metadata(ClusterError),
MissingMetadata(PathBuf),
TabletMismatch {
path: PathBuf,
expected: TabletId,
found: TabletId,
expected_group: RaftGroupId,
found_group: RaftGroupId,
},
MetadataConflict(PathBuf),
InvalidStateTransition {
tablet: TabletId,
from: TabletState,
to: TabletState,
},
InvalidBounds(String),
InvalidDescriptor(String),
Partition(PartitionError),
AlreadyOwned {
tablet: TabletId,
path: PathBuf,
},
}Expand description
The one error type of the tablet surface: descriptors, layout, and ownership.
Variants§
Metadata(ClusterError)
A durable metadata file failed the node.rs idiom’s checks (unknown version, corrupt payload, I/O). Always fail closed.
MissingMetadata(PathBuf)
No tablet.json exists where a tablet was expected.
TabletMismatch
The persisted metadata names a different tablet or Raft group than the directory it lives in.
Fields
expected_group: RaftGroupIdRaft group id implied by the layout.
found_group: RaftGroupIdRaft group id the metadata names.
MetadataConflict(PathBuf)
create found existing, different metadata; never silently replaced.
InvalidStateTransition
The requested TabletState transition is not in the graph.
InvalidBounds(String)
Empty or inverted partition bounds.
InvalidDescriptor(String)
A TabletDescriptor failed structural validation.
Partition(PartitionError)
Partitioning failed.
AlreadyOwned
Another tablet storage core in this process already owns the tablet directory (spec section 4.1; mirrors S1A-002).
Trait Implementations§
Source§impl Debug for TabletError
impl Debug for TabletError
Source§impl Display for TabletError
impl Display for TabletError
Source§impl Error for TabletError
impl Error for TabletError
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<ClusterError> for TabletError
impl From<ClusterError> for TabletError
Source§fn from(source: ClusterError) -> Self
fn from(source: ClusterError) -> Self
Source§impl From<PartitionError> for TabletError
impl From<PartitionError> for TabletError
Source§fn from(source: PartitionError) -> Self
fn from(source: PartitionError) -> Self
Source§impl From<TabletError> for MergeError
impl From<TabletError> for MergeError
Source§fn from(source: TabletError) -> Self
fn from(source: TabletError) -> Self
Source§impl From<TabletError> for RuntimeError
impl From<TabletError> for RuntimeError
Source§fn from(source: TabletError) -> Self
fn from(source: TabletError) -> Self
Source§impl From<TabletError> for SplitError
impl From<TabletError> for SplitError
Source§fn from(source: TabletError) -> Self
fn from(source: TabletError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for TabletError
impl !UnwindSafe for TabletError
impl Freeze for TabletError
impl Send for TabletError
impl Sync for TabletError
impl Unpin for TabletError
impl UnsafeUnpin for TabletError
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> 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 moreSource§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