mz_catalog::durable::upgrade::v67_to_v68

Function upgrade

Source
pub fn upgrade(
    snapshot: Vec<StateUpdateKind>,
) -> Vec<MigrationAction<StateUpdateKind, StateUpdateKind>>
Expand description

In v68 we switched catalog items to be keyed on a CatalogItemId, this required a few changes:

  • ItemKey switched from containing a single GlobalId to a CatalogItemId.
  • ItemValue added global_id: GlobalId and extra_versions: BTreeMap<Version, GlobalId> fields.
  • CommentKey switched from using GlobalId to CatalogItemId.
  • SourceReferencesKey switched from GlobalId to CatalogItemId
  • GidMappingValue switched from using raw uint64 for an id to newtype SystemCatalogItemId and SystemGlobalId wrappers.

All switches from GlobalId to CatalogItemId we re-use the inner value of the ID.