Skip to content

catalog: list disabled sizes in mz_cluster_replica_sizes - #40305

Draft
jubrad wants to merge 2 commits into
MaterializeInc:mainfrom
jubrad:justin/replica-sizes-disabled-column
Draft

jubrad wants to merge 2 commits into
MaterializeInc:mainfrom
jubrad:justin/replica-sizes-disabled-column

Conversation

@jubrad

@jubrad jubrad commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Problem

mz_catalog.mz_cluster_replica_sizes leaves out disabled sizes, but replicas keep running on them. Anything that joins replicas to sizes loses those replicas: the Console's replica list says "This cluster has no replicas", and mz_cluster_replica_utilization and mz_cluster_replica_history drop rows or report NULL credits. #39557 will disable sizes that were removed from the flag but are still in use, making this routine, so this should land first.

Solution

  • mz_cluster_replica_sizes lists every size and gains a disabled column.
  • A builtin schema migration replaces the table's shard (it is rewritten at every startup anyway).
  • The Console's size picker filters on NOT disabled, gated on environment version so it keeps working against environments without the column.

Testing

  • sqllogictest: rewrote the column list, index accounting, and plan outputs that shift with the new column.
  • test/cluster test-sql-cluster-disk now expects a disabled size to be listed with disabled = true.
  • test/restart disabled-cluster-replica-size-survives-restart now checks that a replica on a disabled size still joins to its size row, with disabled = true.
  • Console: snapshot test for the gated picker query.

Gotchas for reviewers

  • This changes what a stable mz_catalog table returns: anything that lists sizes to pick from now needs WHERE NOT disabled. Worth a release note.
  • DISABLED_REPLICA_SIZES_MIN_VERSION in the Console is 26.50.0-dev and has to match the release this lands in. Bump it before merging if it lands later.
  • Disabled size names, including internal ones, are now visible to every user. The Console already hides mz_% sizes.
  • Other tools that pick sizes from this table need the same filter, e.g. mz-clusterctl (environment.py), whose DISTINCT ON (processes, workers) ... ORDER BY credits_per_hour could now pick a disabled size.

🤖 Generated with Claude Code

@jubrad
jubrad force-pushed the justin/replica-sizes-disabled-column branch from b643bdf to 179d1f8 Compare October 28, 2026 23:20
@jubrad
jubrad force-pushed the justin/replica-sizes-disabled-column branch from 179d1f8 to d175434 Compare October 29, 2026 19:52
jubrad and others added 2 commits October 30, 2026 23:26
Replicas keep running on disabled sizes, so anything joining replicas to
sizes needs their rows. Add a disabled column instead of omitting them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jubrad
jubrad force-pushed the justin/replica-sizes-disabled-column branch from d175434 to ede4ed6 Compare October 31, 2026 04:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants