pub enum RemoteStorageError {
Io(Error),
SegmentNotFound(RemoteLogSegmentId),
InvalidAdd {
id: RemoteLogSegmentId,
reason: String,
},
InvalidSegmentTransition {
id: RemoteLogSegmentId,
from: RemoteLogSegmentState,
to: RemoteLogSegmentState,
},
InvalidPartitionDeleteTransition {
tp: TopicIdPartition,
from: Option<RemotePartitionDeleteState>,
to: RemotePartitionDeleteState,
},
InvalidArgument(String),
Backend(String),
NotReady {
partition: i32,
},
}Expand description
Errors raised by RemoteStorageManager
and RemoteLogMetadataManager
implementations.
Variants§
Io(Error)
An I/O failure in the underlying store (filesystem, object store, …).
SegmentNotFound(RemoteLogSegmentId)
A segment was referenced that the metadata store has never seen.
InvalidAdd
add_remote_log_segment_metadata was called with a starting state
other than RemoteLogSegmentState::CopySegmentStarted, or for a
segment id that already exists.
InvalidSegmentTransition
A lifecycle transition was requested that the state machine forbids.
Fields
id: RemoteLogSegmentIdThe segment whose transition was rejected.
from: RemoteLogSegmentStateCurrent state.
to: RemoteLogSegmentStateRequested state.
InvalidPartitionDeleteTransition
A partition-delete lifecycle transition was requested that the state machine forbids.
Fields
tp: TopicIdPartitionThe partition whose transition was rejected.
from: Option<RemotePartitionDeleteState>Current state (None when the partition was never marked).
to: RemotePartitionDeleteStateRequested state.
InvalidArgument(String)
Constructor / argument validation failed.
Backend(String)
A backend (e.g. an object store) raised an error that doesn’t map cleanly to one of the structured variants above.
NotReady
The metadata partition that would answer this query is assigned to
this broker but its consumer has not yet caught up to the high-water
mark observed when the partition was assigned. The answer is unknown,
not “no segment” — callers should retry rather than treat it as a
definitive miss. Ok(None) is reserved for “caught up, no covering
segment” and for partitions this broker does not consume at all.
Trait Implementations§
Source§impl Debug for RemoteStorageError
impl Debug for RemoteStorageError
Source§impl Display for RemoteStorageError
impl Display for RemoteStorageError
Source§impl Error for RemoteStorageError
impl Error for RemoteStorageError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteStorageError
impl !UnwindSafe for RemoteStorageError
impl Freeze for RemoteStorageError
impl Send for RemoteStorageError
impl Sync for RemoteStorageError
impl Unpin for RemoteStorageError
impl UnsafeUnpin for RemoteStorageError
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
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