Skip to main content

Crate ursula_runtime

Crate ursula_runtime 

Source
Expand description

Per-core actor runtime for Ursula.

Module map:

  • [cold_store]: opendal-backed cold tier handle and object path helpers.
  • [request]: HTTP/gRPC request and response value types for each engine op.
  • [command]: the replicated GroupWriteCommand and From conversions from request values into the wire command consumed by GroupEngine.
  • [error]: runtime-level error type RuntimeError.
  • [engine]: the GroupEngine trait, factory, metrics, and the boxed-future type aliases that form the replaceable per-group engine boundary, plus the in-memory and WAL implementations under [engine::in_memory] and [engine::wal].
  • [runtime]: ShardRuntime, RuntimeConfig, and per-core worker spawn.
  • [core_worker]: single-thread actor that owns groups for one core.
  • [group_actor]: per-group mailbox actor running inside a core worker.
  • [metrics]: runtime metrics shared across cores; lock-free counters.

Re-exports§

pub use cold_index::ColdIndexPage;
pub use cold_index::ColdIndexPageCache;
pub use cold_index::ColdIndexPageKey;
pub use cold_index::ColdIndexPageStore;
pub use cold_index::ColdStoreColdIndexPageStore;
pub use cold_index::InMemoryColdIndexPageStore;
pub use cold_index::cold_index_prefix;
pub use cold_index::write_cold_chunk_index_pages;
pub use cold_index::write_external_segment_index_pages;
pub use cold_worker::spawn_cold_flush_worker_if_configured;
pub use cold_worker::spawn_cold_gc_worker_if_configured;

Modules§

cold_index
cold_worker
Cold-tier background workers.
journal
Append-only framed journal.

Structs§

AckColdGcResponse
AppendBatchRequest
AppendBatchResponse
AppendExternalRequest
AppendRequest
AppendResponse
BootstrapStreamRequest
BootstrapStreamResponse
BootstrapUpdate
CloseStreamRequest
CloseStreamResponse
ColdConfig
Cold-tier flush, GC, and cache configuration.
ColdFlushCandidate
ColdGcEntry
One unit of deferred cold-storage reclamation. Enqueued deterministically in the state machine when a stream’s cold objects become unreferenced, drained asynchronously by the leader’s background GC worker.
ColdHotBacklog
ColdReadCacheParams
Runtime parameters for the optional cold-read cache.
ColdStore
ColdStoreFault
ColdStoreFaultContext
ColdStoreFaultEffect
ColdStoreInfo
ColdWriteAdmission
CreateStreamExternalRequest
CreateStreamRequest
CreateStreamResponse
DeleteSnapshotRequest
DeleteStreamRequest
DeleteStreamResponse
FlushColdRequest
FlushColdResponse
ForkRefResponse
GetStreamAttrsRequest
GetStreamAttrsResponse
GroupAppendBatchResponse
GroupEngineMetrics
GroupLeaderHint
GroupReadStreamParts
GroupSnapshot
HeadStreamRequest
HeadStreamResponse
InMemoryGroupEngine
InMemoryGroupEngineFactory
InlineSnapshotStore
Bytes live inside the pointer. Equivalent to today’s in-memory snapshot.
LocalSnapshotStore
Bytes live on the local filesystem under a root directory.
PlanColdFlushRequest
PlanGroupColdFlushRequest
PublishSnapshotRequest
PublishSnapshotResponse
RaftUncommittedAdmission
Per-group admission that rejects new writes when the raft layer has not yet committed enough previously-submitted bytes. Independently configurable from the cold-side admission; intended to catch “replication lag” scenarios where hot bytes have not yet grown because nothing is committing.
ReadSnapshotRequest
ReadSnapshotResponse
ReadStreamRequest
ReadStreamResponse
RuntimeConfig
RuntimeMailboxSnapshot
RuntimeMetrics
RuntimeMetricsSnapshot
S3SnapshotStore
Bytes live in an opendal-managed S3 bucket under {prefix}/group-{gid}/.
ShardRuntime
SnapshotKey
Identifier the store uses to derive a key/path for a snapshot blob.
SnapshotPointer
Reference shipped through openraft SnapshotData. Tiny when the backend stores the actual bytes out of line.
StreamAppendCount
StreamAttrs
StreamIntegritySnapshot
TouchStreamAccessResponse
UpdateStreamAttrsRequest
UpdateStreamAttrsResponse
WalGroupEngine
WalGroupEngineFactory

Enums§

ColdGcTarget
ColdStoreEvent
ColdStoreOperation
ErrorStatus
GroupEngineError
GroupInfraError
Infra error variants with structured fields render their human message on demand (message) instead of storing a denormalized copy alongside the fields. Internal is the exception: it carries free-form text with no structured source, so it keeps an owned message.
GroupReadStreamBody
GroupWriteCommand
GroupWriteResponse
RuntimeError
RuntimeThreading
SnapshotCompression
SnapshotLocation
Where a snapshot blob lives. Carried in SnapshotPointer over openraft.
SnapshotStoreError
StreamErrorCode
StreamErrorContext

Traits§

GroupEngine
GroupEngineFactory
SnapshotStore

Functions§

default_snapshot_store
Default backend used when none is wired: bytes ride inline in the pointer.
new_cold_chunk_path
new_external_payload_path
snapshot_store_from_config
Pick a snapshot store from a typed ursula_config::RaftSnapshotConfig. Returns None when the backend is “inline” (the default) so callers can fall back to default_snapshot_store without instantiating anything.

Type Aliases§

ColdChunkRef
ColdStoreHandle
ExternalPayloadRef
GroupAckColdGcFuture
GroupAppendBatchFuture
GroupAppendFuture
GroupBootstrapStreamFuture
GroupCloseStreamFuture
GroupColdHotBacklogFuture
GroupCreateStreamFuture
GroupDeleteSnapshotFuture
GroupDeleteStreamFuture
GroupEngineCreateFuture
GroupFlushColdFuture
GroupForkRefFuture
GroupGetStreamAttrsFuture
GroupHeadStreamFuture
GroupInstallSnapshotFuture
GroupPlanColdFlushFuture
GroupPlanColdGcFuture
GroupPlanNextColdFlushBatchFuture
GroupPlanNextColdFlushFuture
GroupPublishSnapshotFuture
GroupReadSnapshotFuture
GroupReadStreamFuture
GroupReadStreamPartsFuture
GroupRequireLiveReadOwnerFuture
GroupShutdownFuture
GroupSnapshotFuture
GroupTouchStreamAccessFuture
GroupUpdateStreamAttrsFuture
GroupWriteBatchFuture
ProducerRequest
SharedSnapshotStore
SnapshotBytesIterator
SnapshotStoreFuture