Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 34 variants Io(Error), Serialization { message: String, source: Option<Box<dyn Error + Send + Sync>>, }, Corruption(String), Schema(String), CqlParse(String), InvalidFormat(String), UnsupportedFormat(String), UnsupportedVersion { version: String, floor: String, }, Timeout(String), InvalidPath(String), InvalidState(String), QueryExecution(String), ResultTooLarge { budget_bytes: usize, estimated_bytes: usize, rows: usize, }, InvalidReadPath { value: String, }, ForcedReadPathUnavailable { forced: &'static str, reason: String, }, TypeConversion(String), Configuration(String), Storage(String), Memory(String), Concurrency(String), WriteDirLocked { path: String, }, NotFound(String), Table(String), AlreadyExists(String), InvalidOperation(String), ConstraintViolation(String), Transaction(String), Index(String), Compaction(String), Internal(String), Parse(String), InvalidInput(String), UnsupportedQuery(String), Cancelled,
}
Expand description

Main error type for CQLite operations

Variants§

§

Io(Error)

I/O related errors

§

Serialization

Serialization/deserialization errors

Fields

§message: String
§source: Option<Box<dyn Error + Send + Sync>>
§

Corruption(String)

Data corruption errors

§

Schema(String)

Schema validation errors

§

CqlParse(String)

CQL parsing errors

§

InvalidFormat(String)

Invalid format error (for SSTable parsing)

§

UnsupportedFormat(String)

Unsupported format error

§

UnsupportedVersion

SSTable version below the supported Cassandra 5.0 floor.

CQLite targets Cassandra 5.0 (na+/nb BIG, oa/da BTI). A pre-na (mame, Cassandra 3.x) BIG version, or a non-da BTI version, is out of scope and rejected at version-parse time.

Fields

§version: String
§floor: String
§

Timeout(String)

Timeout error

§

InvalidPath(String)

Invalid path error

§

InvalidState(String)

Invalid state error

§

QueryExecution(String)

Query execution errors

§

ResultTooLarge

A materialized result set exceeded the configured byte budget (issue #1582).

Raised by the SELECT executor while collecting a materialized result set, before it grows large enough to threaten the process’s <128MB memory target. This is the byte-unit successor to the coarse row-count safety valve: a byte ceiling correctly distinguishes 1M harmless skinny rows from 100k memory-blowing wide rows. The remedy is in the message — bound the result with a LIMIT clause, or consume it incrementally via the streaming query API instead of materializing the whole set.

Fields

§budget_bytes: usize

Configured materialization byte budget that was exceeded.

§estimated_bytes: usize

Estimated logical size (bytes) of the result collected so far.

§rows: usize

Number of rows collected when the budget was exceeded.

§

InvalidReadPath

An unrecognized CQLITE_READ_PATH value was supplied (issue #1918).

Resolving the read-path forcing knob returns this distinct error rather than silently falling through to auto, so a typo’d knob is loud instead of a no-op. Names the invalid value and the allowed set.

Fields

§value: String

The unrecognized value supplied to the knob.

§

ForcedReadPathUnavailable

Forced point read path could not run a partition-targeted lookup (issue #1918).

Raised whenever a forced read path cannot serve a query without silently diverging from the auto result. Under CQLITE_READ_PATH=point (or the equivalent QueryConfig field) this fires when the executor would not run a genuinely partition-targeted lookup — a classification fallback, an unwired targeted surface (e.g. a metadata IN fan-out), or a build/path that does not actually prune. Under CQLITE_READ_PATH=full it fires for a schema-less sole-pk point lookup, which only the specialized targeted seek can serve correctly (a full scan would return 0 rows instead of the row auto returns). Either way the query fails closed instead of silently returning a wrong result; reason names the concrete cause.

Fields

§forced: &'static str

The forced mode that could not be satisfied ("point" or "full").

§reason: String

The concrete fallback reason label (e.g. partition_key_not_fully_constrained).

§

TypeConversion(String)

Type conversion errors

§

Configuration(String)

Configuration errors

§

Storage(String)

Storage engine errors

§

Memory(String)

Memory management errors

§

Concurrency(String)

Lock/concurrency errors

§

WriteDirLocked

Write directory already locked by another process or Database instance

Returned by WriteEngine::new when the advisory lock on write_dir cannot be acquired because another WriteEngine (in this or another process) already holds it. Only one Database instance may hold a write_dir at a time.

Fields

§path: String

The path that could not be locked

§

NotFound(String)

Resource not found

§

Table(String)

Table errors

§

AlreadyExists(String)

Resource already exists

§

InvalidOperation(String)

Invalid operation

§

ConstraintViolation(String)

Constraint violation

§

Transaction(String)

Transaction errors

§

Index(String)

Index errors

§

Compaction(String)

Compaction errors

§

Internal(String)

Generic internal error

§

Parse(String)

Parse error

§

InvalidInput(String)

Invalid input error

§

UnsupportedQuery(String)

Unsupported query error

§

Cancelled

The operation was cooperatively cancelled (issue #2264).

Raised by a long-running scan (e.g. the compaction streaming read) when its cancellation token is tripped — a client disconnect propagated from the Flight do_get path. Distinct from a genuine failure so callers can treat it as a clean, expected abort rather than corruption.

Implementations§

Source§

impl Error

Source

pub fn serialization(msg: impl Into<String>) -> Self

Create a serialization error

Source

pub fn corruption(msg: impl Into<String>) -> Self

Create a corruption error

Source

pub fn schema(msg: impl Into<String>) -> Self

Create a schema error

Source

pub fn cql_parse(msg: impl Into<String>) -> Self

Create a CQL parse error

Source

pub fn invalid_format(msg: impl Into<String>) -> Self

Create an invalid format error

Source

pub fn unsupported_format(msg: impl Into<String>) -> Self

Create an unsupported format error

Source

pub fn invalid_path(msg: impl Into<String>) -> Self

Create an invalid path error

Source

pub fn invalid_state(msg: impl Into<String>) -> Self

Create an invalid state error

Source

pub fn query_execution(msg: impl Into<String>) -> Self

Create a query execution error

Source

pub fn invalid_read_path(value: impl Into<String>) -> Self

Create an invalid-read-path error (issue #1918).

Source

pub fn forced_read_path_unavailable( forced: &'static str, reason: impl Into<String>, ) -> Self

Create a forced-read-path-unavailable error (issue #1918). forced is the forced mode ("point" or "full"); reason is the concrete cause label.

Source

pub fn type_conversion(msg: impl Into<String>) -> Self

Create a type conversion error

Source

pub fn configuration(msg: impl Into<String>) -> Self

Create a configuration error

Source

pub fn storage(msg: impl Into<String>) -> Self

Create a storage error

Source

pub fn memory(msg: impl Into<String>) -> Self

Create a memory error

Source

pub fn concurrency(msg: impl Into<String>) -> Self

Create a concurrency error

Source

pub fn not_found(msg: impl Into<String>) -> Self

Create a not found error

Source

pub fn already_exists(msg: impl Into<String>) -> Self

Create an already exists error

Source

pub fn invalid_operation(msg: impl Into<String>) -> Self

Create an invalid operation error

Source

pub fn constraint_violation(msg: impl Into<String>) -> Self

Create a constraint violation error

Source

pub fn transaction(msg: impl Into<String>) -> Self

Create a transaction error

Source

pub fn index(msg: impl Into<String>) -> Self

Create an index error

Source

pub fn compaction(msg: impl Into<String>) -> Self

Create a compaction error

Source

pub fn internal(msg: impl Into<String>) -> Self

Create an internal error

Source

pub fn invalid_input(msg: impl Into<String>) -> Self

Create an invalid input error

Source

pub fn parse(msg: impl Into<String>) -> Self

Create a parse error

Source

pub fn unsupported_query(msg: impl Into<String>) -> Self

Create an unsupported query error

Source

pub fn write_dir_locked(path: impl Into<String>) -> Self

Create a write-dir locked error

Source

pub fn table_not_found(msg: impl Into<String>) -> Self

Create a table not found error

Source

pub fn ambiguous_table(msg: impl Into<String>) -> Self

Create an ambiguous table error

Source

pub fn is_recoverable(&self) -> bool

Check if this error is recoverable

Source

pub fn category(&self) -> ErrorCategory

Get the error category

Source§

impl Error

Source

pub fn obs_category(&self) -> ErrorCategory

Telemetry error category for this error (issue #1038).

Distinct from Error::category, which returns the developer-facing crate::error::ErrorCategory. This one returns the bounded, monitoring-oriented crate::observability::ErrorCategory.

Trait Implementations§

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<Box<ErrorKind>> for Error

Convert from bincode errors

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<BtiError> for Error

Source§

fn from(err: BtiError) -> Self

Converts to this type from the input type.
Source§

impl<I> From<Err<Error<I>>> for Error
where I: Debug,

Convert from nom errors

Source§

fn from(err: Err<Error<I>>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Convert from serde_json errors

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CQLiteParseError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParserError> for Error

Source§

fn from(err: ParserError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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