Skip to content

Conversation

teskje
Copy link
Contributor

@teskje teskje commented Sep 22, 2025

Now that self-managed Materialize is a thing, users can provide their own replica sizes, so it is no longer the case that sizes without resource limits specified can only appear in dev environments. This is especially relevant since self-managed users will have to set their disk limit to either None or 0 for swap replica sizes, to avoid engaging the memory limiter.

In mz_cluster_replica_sizes, we only have non-nullable columns for the resource limits, so we have to pick some value. u64::MAX is the most sensible one since it makes it obvious that it is just a placeholder. We were already using it for the CPU and the memory limits, but for the disk limit we were using 1GiB for some reason. This PR changes the placeholder disk limit to u64::MAX as well.

Motivation

  • This PR adds a known-desirable feature.

Part of https://github.com/MaterializeInc/database-issues/issues/9692

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.

Now that self-managed Materialize is a thing, users can provide their
own replica sizes, so it is no longer the case that sizes without
resource limits specified can only appear in dev environments. This is
especially relevant since self-managed users will have to set their disk
limit to either `None` or 0 for swap replica sizes, to avoid engaging
the memory limiter.

In `mz_cluster_replica_sizes`, we only have non-nullable columns for the
resource limits, so we have to pick some value. `u64::MAX` is the most
sensible one since it makes it obvious that it is just a placeholder. We
were already using it for the CPU and the memory limits, but for the
disk limit we were using 1GiB for some reason. This commit changes the
placeholder disk limit to `u64::MAX` as well.
@teskje teskje requested a review from a team as a code owner September 22, 2025 15:15
@teskje teskje requested a review from aljoscha September 22, 2025 15:15
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