Skip to main content

Error

Enum Error 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§timeout: Duration

Configured graceful-shutdown deadline.

§

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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§current: WalSeqNo

Checkpoint previously supplied to this writer.

§requested: WalSeqNo

Regressing checkpoint supplied by the caller.

§

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 enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§record_index: usize

First record index where the recovered witnesses disagree.

§

#[non_exhaustive]
RecoveryPrefixTooShort

Recovery did not find the committed number of records.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§expected: usize

Minimum record count required by the committed boundary.

§actual: usize

Record count recovered from the available witnesses.

§

#[non_exhaustive]
SealDigestMismatch

Recovered bytes disagree with the manifest’s committed SHA-256 seal.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§expected: String

Digest committed by the manifest.

§actual: String

Digest computed from the recovered bytes.

§

#[non_exhaustive]
SealCrc32cMismatch

Recovered bytes disagree with the manifest’s committed CRC32C.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§expected: u32

CRC32C committed by the manifest.

§actual: u32

CRC32C computed from the recovered bytes.

§

InvalidManifest(String)

The manifest register is malformed or inconsistent with this volume.

§

SegmentDirectoryFull

The manifest cannot retain another sealed-segment directory entry.

§

ManifestUnavailable

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 enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§expected: WalSeqNo

Exact sequence number required for the next admission.

§actual: WalSeqNo

Sequence number supplied by the caller.

§

#[non_exhaustive]
RecordTooLarge

A record exceeded the configured application-payload limit.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§max: usize

Configured per-record payload-byte limit.

§actual: usize

Payload bytes supplied by the caller.

§

#[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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§max: usize

Configured hard active-object ceiling.

§current: usize

Encoded bytes already charged to the active segment.

§requested: usize

Encoded bytes required by the rejected record.

§

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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§zone: usize

Replica zone where the operation failed.

§code: TransportCode

Stable protocol-facing classification.

§message: String

Provider diagnostic text; correctness never matches this string.

Implementations§

Source§

impl Error

Source

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 Clone for Error

Source§

fn clone(&self) -> Error

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ManifestStoreError> for Error

Source§

fn from(source: ManifestStoreError) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more