Module mz_adapter::catalog::open::builtin_item_migration

source Β·
Expand description

Migrations for builtin items.

Modules§

Structs§

Functions§

  • fetch_upper πŸ”’
  • Perform migrations for any builtin items that may have changed between versions.
  • An implementation of builtin item migrations that is compatible with zero down-time upgrades. The issue with the legacy approach is that it mints new global IDs for each migrated item and its descendents, without durably writing those IDs down in the catalog. As a result, the previous Materialize version, which is still running, may allocate the same global IDs. This would cause confusion for the current version when it’s promoted to the leader because its definition of global IDs will no longer be valid. At best, the current version would have to rehydrate all objects that depend on migrated items. At worst, it would panic.
  • The legacy method for builtin migrations is to drop all migrated items and all of their dependents and re-create them all with the new schema and new global IDs.