mz_catalog::durable::persist

Type Alias UnopenedPersistCatalogState

Source
pub(crate) type UnopenedPersistCatalogState = PersistHandle<StateUpdateKindJson, UnopenedCatalogStateInner>;
Expand description

A Handle to an unopened catalog stored in persist. The unopened catalog can serve Config data, Setting data, or the current epoch. All other catalog data may be un-migrated and should not be read until the catalog has been opened. The UnopenedPersistCatalogState is responsible for opening the catalog, see OpenableDurableCatalogState::open for more details.

Production users should call Self::expire before dropping an UnopenedPersistCatalogState so that it can expire its leases. If/when rust gets AsyncDrop, this will be done automatically.

Aliased Type§

struct UnopenedPersistCatalogState {
Show 13 fields pub(crate) mode: Mode, since_handle: SinceHandle<SourceData, (), Timestamp, i64, i64>, write_handle: WriteHandle<SourceData, (), Timestamp, i64>, listen: Listen<SourceData, (), Timestamp, i64>, persist_client: PersistClient, shard_id: ShardId, pub(crate) snapshot: Vec<(StateUpdateKindJson, Timestamp, i64)>, update_applier: UnopenedCatalogStateInner, pub(crate) upper: Timestamp, fenceable_token: FenceableToken, catalog_content_version: Version, bootstrap_complete: bool, metrics: Arc<Metrics>,
}

Fields§

§mode: Mode

The Mode that this catalog was opened in.

§since_handle: SinceHandle<SourceData, (), Timestamp, i64, i64>

Since handle to control compaction.

§write_handle: WriteHandle<SourceData, (), Timestamp, i64>

Write handle to persist.

§listen: Listen<SourceData, (), Timestamp, i64>

Listener to catalog changes.

§persist_client: PersistClient

Handle for connecting to persist.

§shard_id: ShardId

Catalog shard ID.

§snapshot: Vec<(StateUpdateKindJson, Timestamp, i64)>

Cache of the most recent catalog snapshot.

We use a tuple instead of StateUpdate to make consolidation easier.

§update_applier: UnopenedCatalogStateInner

Applies custom processing, filtering, and fencing for each individual update.

§upper: Timestamp

The current upper of the persist shard.

§fenceable_token: FenceableToken

The fence token of the catalog, if one exists.

§catalog_content_version: Version

The semantic version of the current binary.

§bootstrap_complete: bool

Flag to indicate if bootstrap is complete.

§metrics: Arc<Metrics>

Metrics for the persist catalog.