Skip to content

Commit 1369e7f

Browse files
committed
Set replication factor to 0 for mz_probe and mz_system by default in self managed
1 parent da774ee commit 1369e7f

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

misc/helm-charts/operator/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ spec:
103103
{{ if .Values.operator.clusters.defaultSizes.analytics }}
104104
- "--bootstrap-builtin-analytics-cluster-replica-size={{ .Values.operator.clusters.defaultSizes.analytics }}"
105105
{{- end }}
106+
{{ if .Values.operator.clusters.defaultReplicationFactor.system }}
107+
- "--bootstrap-builtin-system-cluster-replication-factor={{ .Values.operator.clusters.defaultReplicationFactor.system }}"
108+
{{- end }}
109+
{{ if .Values.operator.clusters.defaultReplicationFactor.probe }}
110+
- "--bootstrap-builtin-probe-cluster-replication-factor={{ .Values.operator.clusters.defaultReplicationFactor.probe }}"
111+
{{- end }}
106112
{{- end }}
107113
- "--image-pull-policy={{ kebabcase .Values.operator.image.pullPolicy }}"
108114
{{- range $key, $value := .Values.environmentd.nodeSelector }}

misc/helm-charts/operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ operator:
175175
support: 25cc
176176
catalogServer: 50cc
177177
analytics: 25cc
178+
defaultReplicationFactor:
179+
system: 0
180+
probe: 0
178181

179182
# Node selector to use for the operator pod
180183
nodeSelector: {}

src/materialized/ci/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ export MZ_BOOTSTRAP_BUILTIN_SUPPORT_CLUSTER_REPLICA_SIZE="${MZ_BOOTSTRAP_BUILTIN
190190
export MZ_BOOTSTRAP_BUILTIN_CATALOG_SERVER_CLUSTER_REPLICA_SIZE="${MZ_BOOTSTRAP_BUILTIN_CATALOG_SERVER_CLUSTER_REPLICA_SIZE:-${MZ_BOOTSTRAP_DEFAULT_CLUSTER_REPLICA_SIZE}}"
191191
export MZ_BOOTSTRAP_BUILTIN_ANALYTICS_CLUSTER_REPLICA_SIZE="${MZ_BOOTSTRAP_BUILTIN_ANALYTICS_CLUSTER_REPLICA_SIZE:-${MZ_BOOTSTRAP_DEFAULT_CLUSTER_REPLICA_SIZE}}"
192192

193+
# Note(SangJunBak) We set mz_probe and mz_system's replication factors to 0. This is to reduce the amount
194+
# of resources needed to run the emulator.
195+
export MZ_BOOTSTRAP_BUILTIN_SYSTEM_CLUSTER_REPLICATION_FACTOR="0"
196+
export MZ_BOOTSTRAP_BUILTIN_PROBE_CLUSTER_REPLICATION_FACTOR="0"
197+
193198
export MZ_SYSTEM_PARAMETER_DEFAULT="${MZ_SYSTEM_PARAMETER_DEFAULT:-allowed_cluster_replica_sizes=\"25cc\",\"50cc\",\"100cc\",\"200cc\",\"300cc\",\"400cc\",\"600cc\",\"800cc\",\"1200cc\",\"1600cc\",\"3200cc\";enable_rbac_checks=false;enable_statement_lifecycle_logging=false;statement_logging_default_sample_rate=0;statement_logging_max_sample_rate=0}"
194199

195200

src/orchestratord/src/controller/materialize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ pub struct MaterializeControllerArgs {
105105
#[clap(long)]
106106
bootstrap_builtin_support_cluster_replica_size: Option<String>,
107107
#[clap(long)]
108-
bootstrap_builtin_catalog_server_cluster_replica_size: Option<String>,
108+
bootstrap_builtin_system_cluster_replication_factor: Option<u32>,
109109
#[clap(long)]
110-
bootstrap_builtin_analytics_cluster_replica_size: Option<String>,
110+
bootstrap_builtin_probe_cluster_replication_factor: Option<u32>,
111111

112112
#[clap(
113113
long,

src/orchestratord/src/controller/materialize/environmentd.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,15 +831,15 @@ fn create_environmentd_statefulset_object(
831831
.as_ref()
832832
.map(|size| format!("--bootstrap-builtin-support-cluster-replica-size={size}")),
833833
config
834-
.bootstrap_builtin_catalog_server_cluster_replica_size
834+
.bootstrap_builtin_system_cluster_replication_factor
835835
.as_ref()
836-
.map(|size| {
837-
format!("--bootstrap-builtin-catalog-server-cluster-replica-size={size}")
836+
.map(|replication_factor| {
837+
format!("--bootstrap-builtin-system-cluster-replication-factor={replication_factor}")
838838
}),
839839
config
840-
.bootstrap_builtin_analytics_cluster_replica_size
840+
.bootstrap_builtin_probe_cluster_replication_factor
841841
.as_ref()
842-
.map(|size| format!("--bootstrap-builtin-analytics-cluster-replica-size={size}")),
842+
.map(|replication_factor| format!("--bootstrap-builtin-probe-cluster-replication-factor={replication_factor}")),
843843
]
844844
.into_iter()
845845
.flatten(),

0 commit comments

Comments
 (0)