Function migrate_builtin_items

Source
pub(crate) async fn migrate_builtin_items(
    state: &mut CatalogState,
    txn: &mut Transaction<'_>,
    local_expr_cache: &mut LocalExpressionCache,
    migrated_builtins: Vec<CatalogItemId>,
    __arg4: BuiltinItemMigrationConfig,
) -> Result<BuiltinItemMigrationResult, Error>
Expand description

Perform migrations for any builtin items that may have changed between versions.

We only need to do anything for items that have an associated storage collection. Others (views, indexes) don’t have any durable state that requires migration.

We have the ability to handle some backward-compatible schema changes through persist schema evolution, and we do so when possible. For changes that schema evolution doesn’t support, we instead “migrate” the affected storage collections by creating new persist shards with the new schemas and dropping the old ones. See migrate_builtin_collections_incompatible for details.