Skip to main content

HawDBError

Enum HawDBError 

Source
pub enum HawDBError {
Show 35 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>), 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.

Fields

§message: String
§

Schema

A relational schema refusal, such as a value of the wrong type for its column. Displays like HawDBError::Constraint.

Fields

§message: String
§

FileDescriptors(FileDescriptorError)

§

StorageIntegrity(String)

§

WalRecoveryIo

Recovery IO may have completed an effect; reopen to resume its audit.

Fields

§operation: &'static str
§os_code: Option<i32>
§message: String
§

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”).

Fields

§destination: PathBuf
§message: String
§

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.

Fields

§projection: Option<PathBuf>
§message: String
§

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

§source_graph_commit_epoch: Option<u64>
§target_graph_commit_epoch: u64
§message: String
§

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.

Fields

§projection: PathBuf
§recorded: Vec<String>
§requested: Vec<String>
§

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.

Fields

§projection: PathBuf
§marker: String
§message: String
§

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.

Fields

§requested_slots: usize
§reserved_slots: usize
§

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

Fields

§requested: usize
§limit: usize
§

GraphExpansionPayloadLimitExceeded

Fields

§requested: usize
§limit: usize
§

TransactionConflict

Fields

§read_epoch: u64
§committed_epoch: u64
§

TransactionRetryRequired(Box<TransactionRetryError>)

A pessimistic conflict requires retrying the complete transaction.

§

TransactionReadDependencyRefused

Requested read validation cannot be proved; never downgrade isolation.

Fields

§reason: String
§

AppendSequenceExhausted

Fields

§table: String
§watermark: i64
§requested: usize
§

CapabilityUnavailable

Fields

§

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.

Fields

§operation: &'static str
§

BranchCommandUnsupported

Fields

§command: &'static str
§context: &'static str
§

BranchBusy

Fields

§resource: &'static str
§

BranchEvidenceBudgetExceeded

Fields

§resource: &'static str
§requested: u64
§limit: u64
§

BranchReclamationBlocked

An unleased pending create prevents a complete reclamation mark. This identifies retained evidence, not authorization to discard it.

Fields

§branch_id: Uuid
§catalog_revision: u64
§metadata_revision: u64

Implementations§

Source§

impl HawDBError

Source

pub fn read_budget_exceeded( resource: ReadBudgetResource, limit: usize, message: impl Into<String>, ) -> Self

Source

pub fn relational( kind: RelationalErrorKind, surface: RelationalErrorSurface, message: impl Into<String>, ) -> Self

A relational refusal of kind, reported by surface.

Source

pub const fn relational_error_kind(&self) -> Option<RelationalErrorKind>

The relational refusal kind, for Constraint and Schema only.

Source

pub const fn relational_error_surface(&self) -> Option<RelationalErrorSurface>

The layer that reported a Constraint or Schema refusal.

Source

pub fn from_storage_error(error: impl Error + 'static) -> Self

Preserve typed storage refusals through nested error wrappers.

Source

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.

Source

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.

Source§

impl HawDBError

Source

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.

Source

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

Source§

fn clone(&self) -> Self

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 HawDBError

Source§

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

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

impl Display for HawDBError

Source§

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

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

impl Eq for HawDBError

Source§

impl Error for HawDBError

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

Replaced by Error::source.
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<Error> for HawDBError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ResourceBudgetError> for HawDBError

Source§

fn from(error: ResourceBudgetError) -> Self

Converts to this type from the input type.
Source§

impl From<RuntimeCancellationReason> for HawDBError

A stopped runtime task is the typed HawDBError::RuntimeTaskStopped.

Source§

fn from(reason: RuntimeCancellationReason) -> Self

Converts to this type from the input type.
Source§

impl From<RuntimeIoWaveError> for HawDBError

Preserve both I/O-wave outcomes without requiring callers to parse text.

Source§

fn from(error: RuntimeIoWaveError) -> Self

Converts to this type from the input type.
Source§

impl From<TemporalError> for HawDBError

Source§

fn from(error: TemporalError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for HawDBError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HawDBError

Auto Trait Implementations§

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, 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> RuntimeIoWavePermit for T
where T: Debug + Send,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.