You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add SQL DDL for creating and dropping user-defined cluster replica
sizes. Sizes are immutable once created; drop and recreate to change.
Syntax:
CREATE CLUSTER REPLICA SIZE <name> (
CREDITS PER HOUR = '<numeric>', -- required
WORKERS = <n>, -- default 1
SCALE = <n>, -- default 1
MEMORY LIMIT = '<size>', -- e.g. '4GiB', '512MiB', '1GB'
CPU LIMIT = '<cpu>', -- e.g. '0.5' (cores), '500m' (millicpus)
DISK LIMIT = '<size>',
CPU EXCLUSIVE = <bool>,
DISABLED = <bool>,
IS CC = <bool>, -- default true
SWAP ENABLED = <bool>,
NODE SELECTORS = '<json>' -- e.g. '{"kubernetes.io/arch": "arm64"}'
);
DROP CLUSTER REPLICA SIZE <name>;
Access control:
- Gated behind enable_custom_cluster_replica_sizes feature flag
- mz_system bypasses the feature flag (always allowed)
- RBAC requires superuser for both CREATE and DROP
- Cannot drop builtin sizes (from env var) or sizes in use by replicas
- Cannot create a size with a name that already exists
Human-readable units:
- Memory/disk: GiB, MiB, GB, MB, kB, or raw bytes
- CPU: cores (0.5), millicpus (500m), or raw nanocpus
Structured errors for drop rejection (ClusterReplicaSizeInUse,
ReadOnlyClusterReplicaSize). Audit log events for create/drop with
ObjectType::ClusterReplicaSize.
Tests:
- SLT end-to-end test covering feature flag gating, create, use with
cluster, in-use drop rejection, builtin drop rejection, human-
readable units (GiB, millicpus), and cleanup
- Parser roundtrip test
- Updated snapshot tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments