pub enum HawDBError {
Show 32 variants
Parse(String),
Semantic(String),
Storage(String),
Constraint {
surface: RelationalErrorSurface,
message: String,
},
Schema {
surface: RelationalErrorSurface,
message: String,
},
FileDescriptors(FileDescriptorError),
StorageIntegrity(String),
WalRecoveryIo {
operation: &'static str,
kind: ErrorKind,
os_code: Option<i32>,
message: String,
},
UnsupportedStorageFormat(StorageFormatError),
PublishOutcomeUnknown {
destination: PathBuf,
message: String,
},
ProjectionBusy,
SearchProjectionMismatch {
projection: Option<PathBuf>,
message: String,
},
SearchProjectionRebuildRefused {
reason: SearchProjectionRebuildRefusal,
target: PathBuf,
message: String,
},
SearchProjectionEpochAdvanceRefused {
reason: SearchProjectionEpochAdvanceRefusal,
source_graph_commit_epoch: Option<u64>,
target_graph_commit_epoch: u64,
message: String,
},
SearchProjectionOwnershipMismatch {
projection: PathBuf,
recorded: Vec<String>,
requested: Vec<String>,
},
SearchProjectionOwnershipMarkerCorrupt {
projection: PathBuf,
marker: String,
message: String,
},
Execution(String),
ResourceBudgetExceeded(Box<ResourceBudgetError>),
ReadBudgetExceeded(ReadBudgetError),
WalRecordLimitExceeded(Box<WalRecordLimitError>),
GraphExpansionCandidateLimitExceeded {
requested: usize,
limit: usize,
},
GraphExpansionPayloadLimitExceeded {
requested: usize,
limit: usize,
},
TransactionConflict {
read_epoch: u64,
committed_epoch: u64,
key: String,
},
TransactionRetryRequired(Box<TransactionRetryError>),
TransactionReadDependencyRefused {
reason: String,
},
AppendSequenceExhausted {
table: String,
watermark: i64,
requested: usize,
},
CapabilityUnavailable {
capability: RuntimeCapability,
},
ReadOnly {
operation: &'static str,
},
BranchCommandUnsupported {
command: &'static str,
context: &'static str,
},
BranchBusy {
resource: &'static str,
},
BranchEvidenceBudgetExceeded {
resource: &'static str,
requested: u64,
limit: u64,
},
BranchReclamationBlocked {
branch_id: Uuid,
catalog_revision: u64,
metadata_revision: u64,
cause: Box<HawDBError>,
},
}Variants§
Parse(String)
Semantic(String)
Storage(String)
Constraint
A relational constraint violation, such as a duplicate key or a NULL
in a NOT NULL column. It displays as Storage or Execution would,
by surface; message is the relational text after that prefix.
Schema
A relational schema refusal, such as a value of the wrong type for its
column. Displays like HawDBError::Constraint.
FileDescriptors(FileDescriptorError)
StorageIntegrity(String)
WalRecoveryIo
Recovery IO may have completed an effect; reopen to resume its audit.
UnsupportedStorageFormat(StorageFormatError)
PublishOutcomeUnknown
A directory publication reached the point where its result may be
visible at destination, then failed before success was durable (for
example the parent-directory sync). The destination is not a failed
attempt: never remove it on the strength of this error. Reconcile it
instead (docs/LOGICAL_DUMP.md, “Unknown publication outcome”).
ProjectionBusy
A registered Search target is retained by another native operation.
SearchProjectionMismatch
A search projection’s resident snapshot disagrees with the immutable
projection its selector publishes, for example after a crash inside a
resident checkpoint written by HawDB 0.31.0 or earlier (#1711). The
projection is refused as a whole and is not retryable as-is: rebuild it
from the authoritative graph. The check reads only the projection’s own
directory; the graph opens first and is not affected. projection is
the projection directory when the refusing open knows it. Displays as
a storage error.
SearchProjectionRebuildRefused
A search projection rebuild was refused and installed nothing. The
graph, the current projection directory and the target name are
unchanged; only this attempt is void. This is not a storage failure:
fix the precondition named by reason (or retry a verification
mismatch after investigating the host source) and rebuild again.
SearchProjectionEpochAdvanceRefused
A metadata-only search projection epoch advance was refused and
published nothing: the projection keeps source_graph_commit_epoch.
This is not a storage failure. The graph and the projection are
unchanged; apply or catch up the range normally instead.
Fields
SearchProjectionOwnershipMismatch
The externally owned search projection kinds requested at open differ from the set recorded with the projection (#1814). The open is refused and nothing is changed. Kinds are their lowercase projection names, sorted. Pass the recorded set again, or rebuild the projection into a new directory to change it. Not a storage failure.
SearchProjectionOwnershipMarkerCorrupt
An externally owned search projection record (#1814) in the
projection directory cannot be parsed. Not a storage failure and not
poisoning: nothing was changed. Reopen with
EmbeddedStoreOpenOptions::with_externally_owned_search_kinds_reset
to rewrite both records from the passed set; that creates a fresh
rows-required fence so the host re-pushes its rows.
Execution(String)
ResourceBudgetExceeded(Box<ResourceBudgetError>)
Box the diagnostic so successful Result values do not grow with its fields.
ReadBudgetExceeded(ReadBudgetError)
WalRecordLimitExceeded(Box<WalRecordLimitError>)
A commit’s WAL record would exceed a configured per-record limit. It
is refused before anything is written and leaves the handle usable;
see WalRecordLimitError. Not a storage failure.
GraphExpansionCandidateLimitExceeded
GraphExpansionPayloadLimitExceeded
TransactionConflict
TransactionRetryRequired(Box<TransactionRetryError>)
A pessimistic conflict requires retrying the complete transaction.
TransactionReadDependencyRefused
Requested read validation cannot be proved; never downgrade isolation.
AppendSequenceExhausted
ReadOnly
A write was refused because the handle is read-only (for example an
embedded store opened in GraphMode::ShadowReadOnly). Nothing was
written. This is a caller error, not a storage failure: reopen the
store writable to perform operation.
BranchCommandUnsupported
BranchBusy
BranchEvidenceBudgetExceeded
BranchReclamationBlocked
An unleased pending create prevents a complete reclamation mark. This identifies retained evidence, not authorization to discard it.
Implementations§
Source§impl HawDBError
impl HawDBError
pub fn read_budget_exceeded( resource: ReadBudgetResource, limit: usize, message: impl Into<String>, ) -> Self
Sourcepub fn relational(
kind: RelationalErrorKind,
surface: RelationalErrorSurface,
message: impl Into<String>,
) -> Self
pub fn relational( kind: RelationalErrorKind, surface: RelationalErrorSurface, message: impl Into<String>, ) -> Self
A relational refusal of kind, reported by surface.
Sourcepub const fn relational_error_kind(&self) -> Option<RelationalErrorKind>
pub const fn relational_error_kind(&self) -> Option<RelationalErrorKind>
The relational refusal kind, for Constraint and Schema only.
Sourcepub const fn relational_error_surface(&self) -> Option<RelationalErrorSurface>
pub const fn relational_error_surface(&self) -> Option<RelationalErrorSurface>
The layer that reported a Constraint or Schema refusal.
Sourcepub fn from_storage_error(error: impl Error + 'static) -> Self
pub fn from_storage_error(error: impl Error + 'static) -> Self
Preserve typed storage refusals through nested error wrappers.
Sourcepub fn from_storage_error_with_context(
error: impl Error + 'static,
context: &str,
) -> Self
pub fn from_storage_error_with_context( error: impl Error + 'static, context: &str, ) -> Self
from_storage_error, prefixing a generic Storage message with
context and leaving a preserved typed cause (e.g. FileDescriptors)
unprefixed and unchanged.
Sourcepub const fn is_retryable_transaction_conflict(&self) -> bool
pub const fn is_retryable_transaction_conflict(&self) -> bool
Retry the complete transaction, never only the failed statement. Lock timeouts and generic execution/storage failures are not classified here.
Trait Implementations§
Source§impl Clone for HawDBError
impl Clone for HawDBError
Source§impl Debug for HawDBError
impl Debug for HawDBError
Source§impl Display for HawDBError
impl Display for HawDBError
impl Eq for HawDBError
Source§impl Error for HawDBError
impl Error for HawDBError
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()