Skip to content

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Nov 24, 2025

This PR changes ReplicaAllocation to enforce non-zero values for scale and workers. This makes Materialize refuse to start with replica sizes that specify zero for these values. Previously Materialize would start up but would panic as soon as one tried to create a replica with such an invalid size.

Motivation

  • This PR fixes a previously unreported bug.

Self-managed users can get their environment into a weird state by specifying replica sizes with 0 processes, causing, e.g., division-by-zero errors in the console, and panics when trying to create clusters with such sizes.

Relevant Slack thread.

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@teskje teskje force-pushed the replica-size-nonzero branch 3 times, most recently from 64fbdf5 to c2b7a5f Compare November 24, 2025 17:08
This commit changes `ReplicaAllocation` to enforce non-zero values for
`scale` and `workers`. This makes Materialize refuse to start with
replica sizes that specify zero for these values. Previously Materialize
would start up but would panic as soon as one tried to create a replica
with such an invalid size.
@teskje teskje force-pushed the replica-size-nonzero branch from c2b7a5f to e0cd299 Compare November 24, 2025 17:12
@teskje teskje marked this pull request as ready for review November 25, 2025 16:08
@teskje teskje requested review from a team as code owners November 25, 2025 16:08
@teskje teskje requested review from SangJunBak and aljoscha and removed request for aljoscha November 25, 2025 16:08
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.

1 participant