Module durable

Source
Expand description

This crate is responsible for durably storing and modifying the catalog contents.

Re-exportsยง

pub use crate::durable::objects::Cluster;
pub use crate::durable::objects::ClusterConfig;
pub use crate::durable::objects::ClusterReplica;
pub use crate::durable::objects::ClusterVariant;
pub use crate::durable::objects::ClusterVariantManaged;
pub use crate::durable::objects::Comment;
pub use crate::durable::objects::Database;
pub use crate::durable::objects::DefaultPrivilege;
pub use crate::durable::objects::IntrospectionSourceIndex;
pub use crate::durable::objects::Item;
pub use crate::durable::objects::NetworkPolicy;
pub use crate::durable::objects::ReplicaConfig;
pub use crate::durable::objects::ReplicaLocation;
pub use crate::durable::objects::Role;
pub use crate::durable::objects::RoleAuth;
pub use crate::durable::objects::Schema;
pub use crate::durable::objects::SourceReference;
pub use crate::durable::objects::SourceReferences;
pub use crate::durable::objects::StorageCollectionMetadata;
pub use crate::durable::objects::SystemConfiguration;
pub use crate::durable::objects::SystemObjectDescription;
pub use crate::durable::objects::SystemObjectMapping;
pub use crate::durable::objects::UnfinalizedShard;

Modulesยง

debug
Functionality for manually modifying and displaying the catalog contents. This is helpful for fixing a corrupt catalog.
error ๐Ÿ”’
initialize
metrics ๐Ÿ”’
Prometheus monitoring metrics.
objects
The current types used to represent catalog data stored on disk. These objects generally fall into two categories.
persist ๐Ÿ”’
traits ๐Ÿ”’
transaction ๐Ÿ”’
upgrade ๐Ÿ”’
This module contains all the helpers and code paths for upgrading/migrating the Catalog.

Structsยง

AuditLogIterator
An iterator that returns audit log events in reverse ID order.
BootstrapArgs
Metrics
StateUpdate
A single update to the catalog state.
TestCatalogStateBuilder
A builder to help create an OpenableDurableCatalogState for tests.
Transaction
A Transaction batches multiple catalog operations together and commits them atomically. An operation also logically groups multiple catalog updates together.

Enumsยง

CatalogError
DurableCatalogError
An error that can occur while interacting with a durable catalog.
FenceError
An error that indicates the durable catalog has been fenced.

Constantsยง

AUDIT_LOG_ID_ALLOC_KEY
BUILTIN_MIGRATION_SHARD_KEY
CATALOG_CONTENT_VERSION_KEY ๐Ÿ”’
CATALOG_VERSION
The current version of the Catalog. The current version of the Catalog.
DATABASE_ID_ALLOC_KEY
EXPRESSION_CACHE_SHARD_KEY
OID_ALLOC_KEY
SCHEMA_ID_ALLOC_KEY
STORAGE_USAGE_ID_ALLOC_KEY
SYSTEM_CLUSTER_ID_ALLOC_KEY
SYSTEM_ITEM_ALLOC_KEY
SYSTEM_REPLICA_ID_ALLOC_KEY
USER_CLUSTER_ID_ALLOC_KEY
USER_ITEM_ALLOC_KEY
USER_NETWORK_POLICY_ID_ALLOC_KEY
USER_REPLICA_ID_ALLOC_KEY
USER_ROLE_ID_ALLOC_KEY

Traitsยง

AuditLogIteratorTrait ๐Ÿ”’
DurableCatalogState
A read-write API for the durable catalog state.
OpenableDurableCatalogState
An API for opening a durable catalog state.
ReadOnlyDurableCatalogState
A read only API for the durable catalog state.

Functionsยง

persist_backed_catalog_state
Creates an openable durable catalog state implemented using persist.
shard_id
Deterministically generate a shard ID for the given organization_id and seed.
test_bootstrap_args

Type Aliasesยง

Epoch