Module apply

Source
Expand description

Logic related to applying updates from a mz_catalog::durable::DurableCatalogState to a CatalogState.

Structsยง

InProgressRetractions ๐Ÿ”’
Maintains the state of retractions while applying catalog state updates for a single timestamp. CatalogState maintains denormalized state for certain catalog objects. Updating an object results in applying a retraction for that object followed by applying an addition for that object. When applying those additions it can be extremely expensive to re-build that denormalized state from scratch. To avoid that issue we stash the denormalized state from retractions, so it can be used during additions.

Enumsยง

BootstrapApplyState ๐Ÿ”’
Most updates are applied one at a time, but during bootstrap, certain types are applied separately in a batch for performance reasons. A constraint is that updates must be applied in order. This process is modeled as a state machine that batches then applies groups of updates.

Functionsยง

apply_inverted_lookup ๐Ÿ”’
Helper method to updated inverted lookup maps. The keys are generally names and the values are generally IDs.
apply_with_update ๐Ÿ”’
Helper method to update catalog state, that may need to be updated from a previously retracted object.
lookup_builtin_view_addition ๐Ÿ”’
Looks up a BuiltinView from a SystemObjectMapping.
sort_updates ๐Ÿ”’
Sort StateUpdates in timestamp then dependency order
sort_updates_inner ๐Ÿ”’
Sort StateUpdates in dependency order for a single timestamp.