type PersistCatalogState = PersistHandle<StateUpdateKind, CatalogStateInner>;
Expand description
A durable store of the catalog state using Persist as an implementation. The durable store can serve any catalog data and transactionally modify catalog data.
Production users should call Self::expire
before dropping a PersistCatalogState
so that it can expire its leases. If/when rust gets AsyncDrop, this will be done automatically.
Aliased Type§
struct PersistCatalogState {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<(StateUpdateKind, Timestamp, i64)>,
update_applier: CatalogStateInner,
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<(StateUpdateKind, Timestamp, i64)>
Cache of the most recent catalog snapshot.
We use a tuple instead of StateUpdate
to make consolidation easier.
update_applier: CatalogStateInner
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.