Skip to main content

Module error_codes

Module error_codes 

Source
Expand description

Structured error code registry (LDB-NNNN) and Ring 0 hot path error type. LaminarDB structured error code registry.

Every error in LaminarDB carries a stable LDB-NNNN code that is:

  • Present in the error message (grep-able in logs)
  • Present in the source code (grep-able in code)
  • Stable across versions (codes are never reused)

§Code Ranges

RangeCategory
LDB-0xxxGeneral / configuration
LDB-1xxxSQL parsing & validation
LDB-2xxxWindow / watermark operations
LDB-3xxxJoin operations
LDB-4xxxSerialization / state
LDB-5xxxConnector / I/O
LDB-6xxxCheckpoint / recovery
LDB-7xxxDataFusion / Arrow interop
LDB-8xxxInternal / should-not-happen

This module is the canonical registry for all error code ranges. Downstream crates (laminar-sql, laminar-db, etc.) re-export from here.

Enums§

HotPathError
Ring 0 error — no heap allocation, no formatting on construction.
WarningSeverity
Severity level for warnings (schema inference, recovery, etc.).

Constants§

ARROW_ERROR
Arrow schema or record batch error.
BASE64_DECODE_ERROR
Base64 decode error (inline checkpoint state).
CHECKPOINT_FAILED
Checkpoint creation failed.
CHECKPOINT_NOT_FOUND
Checkpoint not found.
CHECKPOINT_PRUNE_FAILED
Checkpoint prune (old checkpoint cleanup) failed.
CONNECTOR_AUTH_FAILED
Connector authentication failed.
CONNECTOR_CONFIG_ERROR
Connector configuration error.
CONNECTOR_CONNECTION_FAILED
Connector failed to establish a connection.
CONNECTOR_READ_ERROR
Connector read error.
CONNECTOR_SCHEMA_ERROR
Schema inference or compatibility error.
CONNECTOR_SERDE_ERROR
Connector serde (serialization/deserialization) error.
CONNECTOR_WRITE_ERROR
Connector write error.
DESERIALIZATION_FAILED
State deserialization failed for an operator.
DURABILITY_GATE_BACKEND_ERROR
State backend returned an error during the durability gate (backend unreachable, permission denied). Treated as a gate miss; sinks rolled back and the next checkpoint retries.
DURABILITY_GATE_MISS
State durability gate returned false before sink commit. One or more vnodes had not persisted their partials for the epoch. The coordinator rolls back sinks and retries on the next checkpoint.
DURABILITY_GATE_ROLLBACK_FAILED
Sink rollback failed after a durability-gate miss. Sinks may be in an inconsistent state; recovery uses sink_commit_statuses to resolve.
DURABILITY_GATE_ROLLBACK_ON_ERROR_FAILED
Sink rollback failed after a durability-gate backend error.
EXACTLY_ONCE_NON_REPLAYABLE
Exactly-once requires all sources to support replay.
EXACTLY_ONCE_NO_CHECKPOINT
Exactly-once requires checkpointing to be enabled.
EXACTLY_ONCE_SINK_UNSUPPORTED
Exactly-once requires all sinks to support exactly-once semantics.
INTERNAL
Internal error — this is a bug.
INVALID_CONFIG
Invalid configuration value.
INVALID_OPERATION
Invalid operation for the current state.
JOIN_KEY_MISSING
Join key column not found or invalid.
JOIN_TIME_BOUND_MISSING
Time bound required for stream-stream join.
JOIN_TYPE_UNSUPPORTED
Unsupported join type for streaming queries.
JSON_PARSE_ERROR
JSON parse error (connector config, CDC payload, etc.).
LATE_DATA_REJECTED
Late data rejected by window policy.
MANIFEST_PERSIST_FAILED
Checkpoint manifest persistence failed.
MATERIALIZED_VIEW_ERROR
Materialized view error.
MISSING_CONFIG
Missing required configuration key.
MIXED_DELIVERY_CAPABILITIES
Mixed delivery capabilities — some sources are non-replayable.
NO_COMPILED_PROJECTION
No compiled projection or cached plan for pre-aggregation query.
OFFSET_METADATA_MISSING
Source offset metadata missing during recovery.
PIPELINE_ERROR
Pipeline error (start/shutdown lifecycle).
PLAN_OPTIMIZATION_FAILED
DataFusion plan optimization failed.
QUERY_EXECUTION_FAILED
Query execution failed (DataFusion engine error). Note: the SQL layer uses LDB-9001 for execution failures visible to users; LDB-7001 is for internal DataFusion interop issues.
QUERY_PIPELINE_ERROR
Query pipeline error (stream execution context).
RECOVERY_FAILED
Checkpoint recovery failed.
SCHEMA_MISMATCH
Schema mismatch between Rust type and SQL definition.
SERIALIZATION_FAILED
State serialization failed for an operator.
SHUTDOWN
Database is shut down.
SIDECAR_CORRUPTION
Sidecar state data missing or corrupted.
SINK_ALREADY_EXISTS
Sink already exists.
SINK_NOT_FOUND
Sink not found.
SINK_ROLLBACK_FAILED
Sink rollback failed during checkpoint abort.
SOURCE_ALREADY_EXISTS
Source already exists.
SOURCE_NOT_FOUND
Source not found.
SQL_COLUMN_NOT_FOUND
Column not found.
SQL_PLANNING_FAILED
Query planning failed.
SQL_TABLE_NOT_FOUND
Table or source not found.
SQL_TYPE_MISMATCH
Type mismatch.
SQL_UNSUPPORTED
Unsupported SQL syntax.
STATE_CORRUPTION
State corruption detected (checksum mismatch, invalid data).
STATE_KEY_MISSING
State store key not found.
TEMPORAL_JOIN_NO_PK
Temporal join requires a primary key on the right-side table.
UNRESOLVED_CONFIG_VAR
Unresolved config variable (e.g. ${VAR} placeholder).
WAL_CHECKSUM_MISMATCH
WAL checksum mismatch.
WAL_ERROR
WAL (write-ahead log) error.
WAL_INVALID_LENGTH
WAL entry has invalid length (possible corruption).
WATERMARK_REQUIRED
Watermark required for this operation.
WINDOW_INVALID
Invalid window specification.
WINDOW_SIZE_INVALID
Window size must be positive.