pub enum HawDBError {
Show 39 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,
},
SearchProjectionPrefixBehindSource {
complete_through_commit_epoch: u64,
source_commit_epoch: u64,
},
SearchProjectionBatchBudgetExceeded {
budget: SearchProjectionBatchBudget,
commit_epoch: Option<u64>,
required_operations: usize,
limit: usize,
},
SearchProductionQualificationGraphEpochMismatch {
expected_canonical_graph_commit_epoch: u64,
opened_graph_commit_epoch: u64,
},
SearchProductionQualificationRefused {
blocker_codes: Vec<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>),
RuntimeAdmissionRefused(RuntimeAdmissionRefusal),
RuntimeIoWaveReservationExceeded {
requested_slots: usize,
reserved_slots: usize,
},
RuntimeTaskStopped(RuntimeCancellationReason),
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
SearchProjectionPrefixBehindSource
Bounded search projection catch-up selected a changefeed prefix that
ends at complete_through_commit_epoch, before the pinned source
snapshot at source_commit_epoch (#1043, #1924). Hydration reads the
source head, so publishing the prefix would put newer data under an
older watermark; nothing was published and the watermark is
unchanged. Not a storage failure and never poisoning, but not
transient either: retrying with the same budgets, or with a larger
max_batches, refuses again while the pending interval exceeds one
batch. Probe the interval with
build_search_projection_change_batch_from_freshness(index, Some(cap))
and catch up with a batch covering all of it, or re-prepare through
the staged registered-consumer path. When a write landed between the
probe and the catch-up, a fresh probe is enough. Displays as the
execution error it was reported as before.
SearchProjectionBatchBudgetExceeded
A bounded search projection batch needs required_operations, more
than the configured per-batch limit of budget (#1924).
commit_epoch is the single source commit that alone exceeds a
change batch limit, and None when no one commit is known. Nothing
was published and the watermark is unchanged. Not a storage failure
and never poisoning; retry with a limit of at least
required_operations. Displays as the storage error it was
reported as before.
Fields
budget: SearchProjectionBatchBudgetSearchProductionQualificationGraphEpochMismatch
A qualified out-of-core search open found the graph at
opened_graph_commit_epoch, not at the
expected_canonical_graph_commit_epoch its production qualification
was taken at, typically because the graph was written after
qualification (#1932). The qualification is stale; nothing is damaged.
The open was refused before the projection was opened, and nothing was
read from or written to it. Not a storage failure and never poisoning:
catch the projection up, qualify it again at the current epoch and
reopen. Displays as the storage error it was reported as before.
SearchProductionQualificationRefused
A qualified out-of-core search open was refused because the supplied
lexical production qualification does not qualify the opened
projection for the expected release (#1932). blocker_codes are the
sorted blockers recomputed at open: identity blockers such as
projection_identity_mismatch, current_release_identity_mismatch or
source_graph_epoch_current_release_mismatch mean the report
describes another projection generation, epoch or release; the others
mean the report itself is not ready. The projection’s files passed
their open-time checks; damaged files are still StorageIntegrity or
Storage. Not a storage failure and never poisoning: qualify the
projection again and reopen. Displays as the storage error it was
reported as before.
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.
RuntimeAdmissionRefused(RuntimeAdmissionRefusal)
The runtime governor refused admission or retained-memory funding;
nothing ran. Not a storage failure and never poisoning. See
RuntimeAdmissionRefusal::retryable.
RuntimeIoWaveReservationExceeded
The task asked for more concurrent I/O slots than its successful runtime admission reserved. Nothing ran and retrying the same task unchanged cannot succeed; admit it again with a larger I/O reservation. This is not transient I/O saturation: admitted callers wait for held slots until their task stops.
RuntimeTaskStopped(RuntimeCancellationReason)
The caller’s RuntimeTaskContext was cancelled or passed its deadline
(or its resource budget was exhausted) before the work completed.
Nothing from the stopped work was committed. Not a storage failure and
never poisoning; the caller decides whether to retry.
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.
Sourcepub fn is_graph_change_conflict(&self) -> bool
pub fn is_graph_change_conflict(&self) -> bool
A graph-changing commit was published after the snapshot of a
transaction that read graph_change_commit_epoch() for
compare-and-publish. Implies is_retryable_transaction_conflict.
Source§impl HawDBError
impl HawDBError
Sourcepub fn or_stop(
error: &(dyn Error + 'static),
otherwise: impl FnOnce() -> Self,
) -> Self
pub fn or_stop( error: &(dyn Error + 'static), otherwise: impl FnOnce() -> Self, ) -> Self
Return the typed RuntimeTaskStopped when error is (or is caused by)
a cancelled or expired runtime task, otherwise otherwise(). Wrap any
contextual message built from an error that may carry a stop.
Sourcepub fn from_execution_error(error: impl Error + 'static) -> Self
pub fn from_execution_error(error: impl Error + 'static) -> Self
Preserve task stops and I/O-wave reservation mismatches through error wrappers; all other causes keep their existing execution diagnostic.
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()
Source§impl From<Error> for HawDBError
impl From<Error> for HawDBError
Source§impl From<ResourceBudgetError> for HawDBError
impl From<ResourceBudgetError> for HawDBError
Source§fn from(error: ResourceBudgetError) -> Self
fn from(error: ResourceBudgetError) -> Self
Source§impl From<RuntimeCancellationReason> for HawDBError
A stopped runtime task is the typed HawDBError::RuntimeTaskStopped.
impl From<RuntimeCancellationReason> for HawDBError
A stopped runtime task is the typed HawDBError::RuntimeTaskStopped.
Source§fn from(reason: RuntimeCancellationReason) -> Self
fn from(reason: RuntimeCancellationReason) -> Self
Source§impl From<RuntimeIoWaveError> for HawDBError
Preserve both I/O-wave outcomes without requiring callers to parse text.
impl From<RuntimeIoWaveError> for HawDBError
Preserve both I/O-wave outcomes without requiring callers to parse text.