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
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 (ma–me, Cassandra 3.x) BIG version, or a non-da BTI
version, is out of scope and rejected at version-parse time.
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
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.
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.
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.
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
impl Error
Sourcepub fn serialization(msg: impl Into<String>) -> Self
pub fn serialization(msg: impl Into<String>) -> Self
Create a serialization error
Sourcepub fn corruption(msg: impl Into<String>) -> Self
pub fn corruption(msg: impl Into<String>) -> Self
Create a corruption error
Sourcepub fn invalid_format(msg: impl Into<String>) -> Self
pub fn invalid_format(msg: impl Into<String>) -> Self
Create an invalid format error
Sourcepub fn unsupported_format(msg: impl Into<String>) -> Self
pub fn unsupported_format(msg: impl Into<String>) -> Self
Create an unsupported format error
Sourcepub fn invalid_path(msg: impl Into<String>) -> Self
pub fn invalid_path(msg: impl Into<String>) -> Self
Create an invalid path error
Sourcepub fn invalid_state(msg: impl Into<String>) -> Self
pub fn invalid_state(msg: impl Into<String>) -> Self
Create an invalid state error
Sourcepub fn query_execution(msg: impl Into<String>) -> Self
pub fn query_execution(msg: impl Into<String>) -> Self
Create a query execution error
Sourcepub fn invalid_read_path(value: impl Into<String>) -> Self
pub fn invalid_read_path(value: impl Into<String>) -> Self
Create an invalid-read-path error (issue #1918).
Create a forced-read-path-unavailable error (issue #1918). forced is the
forced mode ("point" or "full"); reason is the concrete cause label.
Sourcepub fn type_conversion(msg: impl Into<String>) -> Self
pub fn type_conversion(msg: impl Into<String>) -> Self
Create a type conversion error
Sourcepub fn configuration(msg: impl Into<String>) -> Self
pub fn configuration(msg: impl Into<String>) -> Self
Create a configuration error
Sourcepub fn concurrency(msg: impl Into<String>) -> Self
pub fn concurrency(msg: impl Into<String>) -> Self
Create a concurrency error
Sourcepub fn already_exists(msg: impl Into<String>) -> Self
pub fn already_exists(msg: impl Into<String>) -> Self
Create an already exists error
Sourcepub fn invalid_operation(msg: impl Into<String>) -> Self
pub fn invalid_operation(msg: impl Into<String>) -> Self
Create an invalid operation error
Sourcepub fn constraint_violation(msg: impl Into<String>) -> Self
pub fn constraint_violation(msg: impl Into<String>) -> Self
Create a constraint violation error
Sourcepub fn transaction(msg: impl Into<String>) -> Self
pub fn transaction(msg: impl Into<String>) -> Self
Create a transaction error
Sourcepub fn compaction(msg: impl Into<String>) -> Self
pub fn compaction(msg: impl Into<String>) -> Self
Create a compaction error
Sourcepub fn invalid_input(msg: impl Into<String>) -> Self
pub fn invalid_input(msg: impl Into<String>) -> Self
Create an invalid input error
Sourcepub fn unsupported_query(msg: impl Into<String>) -> Self
pub fn unsupported_query(msg: impl Into<String>) -> Self
Create an unsupported query error
Sourcepub fn write_dir_locked(path: impl Into<String>) -> Self
pub fn write_dir_locked(path: impl Into<String>) -> Self
Create a write-dir locked error
Sourcepub fn table_not_found(msg: impl Into<String>) -> Self
pub fn table_not_found(msg: impl Into<String>) -> Self
Create a table not found error
Sourcepub fn ambiguous_table(msg: impl Into<String>) -> Self
pub fn ambiguous_table(msg: impl Into<String>) -> Self
Create an ambiguous table error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Get the error category
Source§impl Error
impl Error
Sourcepub fn obs_category(&self) -> ErrorCategory
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 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()