#[non_exhaustive]pub enum Error {
Show 31 variants
Closed,
#[non_exhaustive] ShutdownTimeout {
timeout: Duration,
},
Connection(String),
TokenSource(String),
InvalidToken,
InvalidRefreshInterval,
InvalidConfig(&'static str),
NoReadQuorum,
NoQuorum,
InvalidCatalog(String),
#[non_exhaustive] CheckpointRegression {
current: WalSeqNo,
requested: WalSeqNo,
},
InvalidSegmentData(String),
#[non_exhaustive] ConflictingPrefix {
record_index: usize,
},
#[non_exhaustive] RecoveryPrefixTooShort {
expected: usize,
actual: usize,
},
#[non_exhaustive] SealDigestMismatch {
expected: String,
actual: String,
},
#[non_exhaustive] SealCrc32cMismatch {
expected: u32,
actual: u32,
},
InvalidManifest(String),
SegmentDirectoryFull,
ManifestUnavailable,
ManifestStore(ManifestStoreError),
PipelineClosed,
Finalized,
Internal(String),
Poisoned,
Fenced(String),
#[non_exhaustive] OutOfOrder {
expected: WalSeqNo,
actual: WalSeqNo,
},
#[non_exhaustive] RecordTooLarge {
max: usize,
actual: usize,
},
#[non_exhaustive] ActiveSegmentFull {
max: usize,
current: usize,
requested: usize,
},
SequenceExhausted,
RecoveryIncomplete,
#[non_exhaustive] Transport {
zone: usize,
code: TransportCode,
message: String,
},
}Expand description
Failure returned by every fallible chorus-client public operation.
Admission errors are definitive and may be corrected by the caller. In
particular, ActiveSegmentFull does not consume
the supplied sequence number: truncate retained history so rotation can
proceed, then retry the same append. Use may_have_committed
on an append completion error before deciding whether recovery must resolve
an ambiguous outcome.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Closed
The background WAL task was aborted, failed, or shut down.
#[non_exhaustive]ShutdownTimeout
Graceful shutdown exceeded its configured deadline and aborted the remaining owned tasks.
Fields
This variant is marked as non-exhaustive
Connection(String)
A gRPC channel could not be constructed or connected.
TokenSource(String)
The configured identity provider could not issue a token.
InvalidToken
A bearer token cannot be represented in an ASCII gRPC header.
InvalidRefreshInterval
Refreshing would busy-loop because an interval was zero.
InvalidConfig(&'static str)
A WAL engine capacity or size limit was invalid or inconsistent.
NoReadQuorum
Fewer than a strict-majority quorum of replicas could be read.
NoQuorum
An operation could not reach a strict-majority replica quorum.
InvalidCatalog(String)
Listed objects or decoded finalized bytes did not form one chain.
#[non_exhaustive]CheckpointRegression
The application supplied a checkpoint below its prior checkpoint.
Fields
This variant is marked as non-exhaustive
InvalidSegmentData(String)
Finalized bytes or inferred segment bounds disagree with record framing.
#[non_exhaustive]ConflictingPrefix
Recovery witnesses contain different bytes at one record boundary.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]RecoveryPrefixTooShort
Recovery did not find the committed number of records.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]SealDigestMismatch
Recovered bytes disagree with the manifest’s committed SHA-256 seal.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]SealCrc32cMismatch
Recovered bytes disagree with the manifest’s committed CRC32C.
Fields
This variant is marked as non-exhaustive
InvalidManifest(String)
The manifest register is malformed or inconsistent with this volume.
SegmentDirectoryFull
The manifest cannot retain another sealed-segment directory entry.
The manifest register remained unavailable through its retry budget.
ManifestStore(ManifestStoreError)
A caller-supplied manifest register operation failed.
PipelineClosed
An internal commit notification path closed before reporting a result.
Finalized
The low-level segment writer is already finalized.
Internal(String)
An internal invariant failed without a more stable public taxonomy.
Poisoned
An indeterminate append broke the ordered commit prefix.
Fenced(String)
This writer lost ownership to a newer manifest epoch.
#[non_exhaustive]OutOfOrder
The caller supplied a sequence number other than the next admission.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]RecordTooLarge
A record exceeded the configured application-payload limit.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ActiveSegmentFull
The active object cannot admit another encoded record without crossing its configured hard ceiling.
The writer remains healthy and the sequence number was not consumed. This is backpressure, not poison: truncating old sealed segments may free manifest-directory room so the engine can rotate and resume admission. A permanently failed seal still requires restart recovery before rotation can resume.
Fields
This variant is marked as non-exhaustive
SequenceExhausted
No further contiguous sequence number can be represented.
RecoveryIncomplete
Startup replay did not reach its fixed end successfully.
#[non_exhaustive]Transport
Provider operation failed with a stable retry/fencing classification.
Fields
This variant is marked as non-exhaustive
code: TransportCodeStable protocol-facing classification.
Implementations§
Source§impl Error
impl Error
Sourcepub fn may_have_committed(&self) -> bool
pub fn may_have_committed(&self) -> bool
Whether this error can be observed after an append was admitted but before recovery determines its durable outcome.
true is deliberately conservative. Closed,
Internal, and transport failures can also arise
outside append completion, but callers handling an admitted append must
assume it may replay after takeover. Poisoned,
Fenced, and PipelineClosed
always require that same treatment.
Admission and configuration errors, sequence errors,
ActiveSegmentFull, NoQuorum,
manifest/catalog validation errors, and low-level finalized-writer
errors are definitive for the attempted append.
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<ManifestStoreError> for Error
impl From<ManifestStoreError> for Error
Source§fn from(source: ManifestStoreError) -> Self
fn from(source: ManifestStoreError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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