Skip to main content

mz_adapter_types/
dyncfgs.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10//! Dyncfgs used by the adapter layer.
11
12use std::time::Duration;
13
14use mz_dyncfg::{Config, ConfigSet, ParameterScope};
15
16pub const ALLOW_USER_SESSIONS: Config<bool> = Config::new(
17    "allow_user_sessions",
18    true,
19    "Whether to allow user roles to create new sessions. When false, only system roles will be permitted to create new sessions.",
20    ParameterScope::Environment,
21);
22
23// Slightly awkward with the WITH prefix, but we can't start with a 0..
24pub const WITH_0DT_DEPLOYMENT_MAX_WAIT: Config<Duration> = Config::new(
25    "with_0dt_deployment_max_wait",
26    // One year, which in practice makes it so we never cut over when not
27    // hydrated. To prevent cutting over unilaterally when there is an issue.
28    Duration::from_hours(365 * 24),
29    "How long to wait at most for clusters to be hydrated, when doing a zero-downtime deployment.",
30    ParameterScope::Environment,
31);
32
33pub const WITH_0DT_DEPLOYMENT_DDL_CHECK_INTERVAL: Config<Duration> = Config::new(
34    "with_0dt_deployment_ddl_check_interval",
35    Duration::from_secs(5 * 60),
36    "How often to check for DDL changes during zero-downtime deployment.",
37    ParameterScope::Environment,
38);
39
40pub const ENABLE_0DT_DEPLOYMENT_PANIC_AFTER_TIMEOUT: Config<bool> = Config::new(
41    "enable_0dt_deployment_panic_after_timeout",
42    false,
43    "Whether to panic if the maximum wait time is reached but preflight checks have not succeeded.",
44    ParameterScope::Environment,
45);
46
47pub const WITH_0DT_DEPLOYMENT_CAUGHT_UP_CHECK_INTERVAL: Config<Duration> = Config::new(
48    // The feature flag name is historical.
49    "0dt_deployment_hydration_check_interval",
50    Duration::from_secs(10),
51    "Interval at which to check whether clusters are caught up, when doing zero-downtime deployment.",
52    ParameterScope::Environment,
53);
54
55pub const WITH_0DT_CAUGHT_UP_CHECK_ALLOWED_LAG: Config<Duration> = Config::new(
56    "with_0dt_caught_up_check_allowed_lag",
57    Duration::from_secs(60),
58    "Maximum allowed lag when determining whether collections are caught up for 0dt deployments.",
59    ParameterScope::Environment,
60);
61
62pub const WITH_0DT_CAUGHT_UP_CHECK_CUTOFF: Config<Duration> = Config::new(
63    "with_0dt_caught_up_check_cutoff",
64    Duration::from_secs(2 * 60 * 60), // 2 hours
65    "Collections whose write frontier is behind 'now' by more than the cutoff are ignored when doing caught-up checks for 0dt deployments.",
66    ParameterScope::Environment,
67);
68
69pub const ENABLE_0DT_CAUGHT_UP_REPLICA_STATUS_CHECK: Config<bool> = Config::new(
70    "enable_0dt_caught_up_replica_status_check",
71    true,
72    "Enable checking for crash/OOM-looping replicas during 0dt caught-up checks. Emergency break-glass flag to disable this feature if needed.",
73    ParameterScope::Environment,
74);
75
76// TODO(aljoscha): Remove this break-glass flag after a couple of releases, once
77// the sustained-health gate has proven itself in production. It only exists as a
78// fleet-wide automatic revert to the prior "caught-up implies ready" behavior.
79pub const ENABLE_0DT_CAUGHT_UP_STABILITY_CHECK: Config<bool> = Config::new(
80    "enable_0dt_caught_up_stability_check",
81    true,
82    "Require clusters to stay caught-up and healthy for a stability period before being considered ready during 0dt deployments. Emergency break-glass flag: disabling reverts to treating a caught-up cluster as ready with no replica-health requirement, which differs from setting the stability period to zero (a zero period still requires all replicas to be healthy).",
83    ParameterScope::Environment,
84);
85
86pub const WITH_0DT_CAUGHT_UP_CHECK_STABILITY_PERIOD: Config<Duration> = Config::new(
87    "with_0dt_caught_up_check_stability_period",
88    Duration::from_secs(10 * 60), // 10 minutes
89    "How long a cluster must continuously be caught-up and have all replicas healthy before it is considered ready to cut over during a 0dt deployment.",
90    ParameterScope::Environment,
91);
92
93pub const ENABLE_0DT_HYDRATE_MIGRATED_BUILTIN_MVS: Config<bool> = Config::new(
94    "enable_0dt_hydrate_migrated_builtin_mvs",
95    true,
96    "Write-enable replacement-migrated builtin materialized views while read-only during a 0dt \
97     deployment, so they hydrate before cut-over and keep gating promotion. Emergency break-glass \
98     flag: disabling excludes migrated MVs (and their dependents) from the caught-up check again, \
99     so promotion proceeds with them unhydrated. Not an exact revert: a collection with no live \
100     leader frontier must be hydrated either way. Only takes effect when the leader is new enough \
101     for the write to make progress, and is read once at startup, so changing it means setting it \
102     on the leader and restarting the new deployment.",
103    ParameterScope::Environment,
104);
105
106/// Enable logging of statement lifecycle events in mz_internal.mz_statement_lifecycle_history.
107pub const ENABLE_STATEMENT_LIFECYCLE_LOGGING: Config<bool> = Config::new(
108    "enable_statement_lifecycle_logging",
109    true,
110    "Enable logging of statement lifecycle events in mz_internal.mz_statement_lifecycle_history.",
111    ParameterScope::Environment,
112);
113
114/// Enable installation of introspection subscribes.
115pub const ENABLE_INTROSPECTION_SUBSCRIBES: Config<bool> = Config::new(
116    "enable_introspection_subscribes",
117    true,
118    "Enable installation of introspection subscribes.",
119    ParameterScope::Environment,
120);
121
122/// Enable sending subscribes down the new frontend-peek path.
123pub const ENABLE_FRONTEND_SUBSCRIBES: Config<bool> = Config::new(
124    "enable_frontend_subscribes",
125    true,
126    "Enable sending subscribes down the new frontend-peek path.",
127    ParameterScope::Environment,
128);
129
130/// The plan insights notice will not investigate fast path clusters if plan optimization took longer than this.
131pub const PLAN_INSIGHTS_NOTICE_FAST_PATH_CLUSTERS_OPTIMIZE_DURATION: Config<Duration> = Config::new(
132    "plan_insights_notice_fast_path_clusters_optimize_duration",
133    // Looking at production values of the mz_optimizer_e2e_optimization_time_seconds metric, most
134    // optimizations run faster than 10ms, so this should still work well for most queries. We want
135    // to avoid the case where an optimization took just under this value and there are lots of
136    // clusters, so the extra delay to produce the plan insights notice will take the optimization
137    // time * the number of clusters longer.
138    Duration::from_millis(10),
139    "Enable plan insights fast path clusters calculation if the optimize step took less than this duration.",
140    ParameterScope::Environment,
141);
142
143/// Whether to use an expression cache on boot.
144pub const ENABLE_EXPRESSION_CACHE: Config<bool> = Config::new(
145    "enable_expression_cache",
146    true,
147    "Use a cache to store optimized expressions to help speed up start times. \
148     Read at startup, so changing it takes effect on the next restart.",
149    ParameterScope::Environment,
150);
151
152/// Whether to enable password authentication.
153pub const ENABLE_PASSWORD_AUTH: Config<bool> = Config::new(
154    "enable_password_auth",
155    false,
156    "Enable password authentication.",
157    ParameterScope::Environment,
158);
159
160/// Upper bound on the number of transitive dependencies validated for a
161/// read-then-write statement (e.g. `DELETE ... WHERE ... IN (SELECT ...)`).
162/// Validation walks the read set's dependency graph, which is user controlled
163/// and can be arbitrarily large. The bound rejects pathological graphs with a
164/// clean error instead of consuming unbounded time and memory.
165pub const READ_THEN_WRITE_MAX_DEPENDENCIES: Config<usize> = Config::new(
166    "read_then_write_max_dependencies",
167    100_000,
168    "Maximum number of transitive dependencies validated for a read-then-write \
169     statement before it is rejected.",
170    ParameterScope::Environment,
171);
172
173/// OIDC issuer URL.
174pub const OIDC_ISSUER: Config<Option<&'static str>> = Config::new(
175    "oidc_issuer",
176    None,
177    "OIDC issuer URL.",
178    ParameterScope::Environment,
179);
180
181/// OIDC audience (client IDs). When empty, audience validation is skipped.
182/// Validates that the JWT's `aud` claim contains at least one of these values.
183/// It is insecure to skip validation because it is the only
184/// mechanism preventing attackers from authenticating using a JWT
185/// issued by a dummy application, but from the same identity provider.
186pub const OIDC_AUDIENCE: Config<fn() -> serde_json::Value> = Config::new(
187    "oidc_audience",
188    || serde_json::json!([]),
189    "OIDC audience (client IDs). A JSON array of strings. When empty, audience validation is skipped.",
190    ParameterScope::Environment,
191);
192
193/// OIDC authentication claim to use as username
194pub const OIDC_AUTHENTICATION_CLAIM: Config<&'static str> = Config::new(
195    "oidc_authentication_claim",
196    "sub",
197    "OIDC authentication claim to use as username.",
198    ParameterScope::Environment,
199);
200
201/// Whether OIDC group-to-role sync is enabled.
202/// When true, JWT group claims are used to sync role memberships on login.
203pub const OIDC_GROUP_ROLE_SYNC_ENABLED: Config<bool> = Config::new(
204    "oidc_group_role_sync_enabled",
205    false,
206    "Enable OIDC JWT group-to-role membership sync on login.",
207    ParameterScope::Environment,
208);
209
210/// The JWT claim path that contains group memberships. May be a bare claim
211/// name (e.g. `groups`) or a dot-separated path into nested objects (e.g.
212/// `customClaims.groups`).
213pub const OIDC_GROUP_CLAIM: Config<&'static str> = Config::new(
214    "oidc_group_claim",
215    "groups",
216    "JWT claim path containing group memberships for role sync. Supports dot-separated paths into nested objects (e.g. customClaims.groups).",
217    ParameterScope::Environment,
218);
219
220/// Whether to reject login when group sync fails (strict/fail-closed mode).
221/// When false (default), sync failures are logged but login proceeds (fail-open).
222pub const OIDC_GROUP_ROLE_SYNC_STRICT: Config<bool> = Config::new(
223    "oidc_group_role_sync_strict",
224    false,
225    "When true, reject login if OIDC group-to-role sync fails (fail-closed).",
226    ParameterScope::Environment,
227);
228
229pub const PERSIST_FAST_PATH_ORDER: Config<bool> = Config::new(
230    "persist_fast_path_order",
231    false,
232    "If set, send queries with a compatible literal constraint or ordering clause down the Persist fast path.",
233    ParameterScope::Environment,
234);
235
236/// Whether to enforce that S3 Tables connections are in the same region as the Materialize
237/// environment.
238pub const ENABLE_S3_TABLES_REGION_CHECK: Config<bool> = Config::new(
239    "enable_s3_tables_region_check",
240    false,
241    "Whether to enforce that S3 Tables connections are in the same region as the environment.",
242    ParameterScope::Environment,
243);
244
245/// Whether the MCP agent endpoint is enabled.
246pub const ENABLE_MCP_AGENT: Config<bool> = Config::new(
247    "enable_mcp_agent",
248    true,
249    "Whether the MCP agent HTTP endpoint is enabled. When false, requests to /api/mcp/agent return 503 Service Unavailable.",
250    ParameterScope::Environment,
251);
252
253/// Whether the MCP agent query tool is enabled.
254/// When false, the `query` tool is hidden from tools/list and calls to it return an error.
255/// Agents can still use `get_data_products` and `get_data_product_details`.
256pub const ENABLE_MCP_AGENT_QUERY_TOOL: Config<bool> = Config::new(
257    "enable_mcp_agent_query_tool",
258    true,
259    "Whether the MCP agent query tool is enabled. When false, the query tool is not advertised and calls to it are rejected. Agents can still discover and inspect data products.",
260    ParameterScope::Environment,
261);
262
263/// Whether the MCP agent read_data_product tool is enabled.
264/// When false, the `read_data_product` tool is hidden from tools/list and calls to it return an error.
265/// The `query` tool is the general-purpose alternative for reading data products.
266pub const ENABLE_MCP_AGENT_READ_DATA_PRODUCT_TOOL: Config<bool> = Config::new(
267    "enable_mcp_agent_read_data_product_tool",
268    true,
269    "Whether the MCP agent read_data_product tool is enabled. When false, the read_data_product tool is not advertised and calls to it are rejected. Agents can use the query tool to read data products.",
270    ParameterScope::Environment,
271);
272
273/// Whether the MCP developer endpoint is enabled.
274pub const ENABLE_MCP_DEVELOPER: Config<bool> = Config::new(
275    "enable_mcp_developer",
276    true,
277    "Whether the MCP developer HTTP endpoint is enabled. When false, requests to /api/mcp/developer return 503 Service Unavailable.",
278    ParameterScope::Environment,
279);
280
281/// Whether the MCP developer query tool is enabled.
282/// When false, the `query` tool is hidden from tools/list and calls to it return an error.
283/// Developers can still use `query_system_catalog`.
284pub const ENABLE_MCP_DEVELOPER_QUERY_TOOL: Config<bool> = Config::new(
285    "enable_mcp_developer_query_tool",
286    true,
287    "Whether the MCP developer query tool is enabled. When false, the query tool is not advertised and calls to it are rejected. Developers can still use query_system_catalog.",
288    ParameterScope::Environment,
289);
290
291/// Whether the external metrics endpoint on environmentd is enabled.
292pub const ENABLE_PUBLIC_METRICS_ENDPOINT: Config<bool> = Config::new(
293    "enable_public_metrics_endpoint",
294    true,
295    "Whether the external metrics endpoint on environmentd is enabled. When false, requests return 503.",
296    ParameterScope::Environment,
297);
298
299/// Maximum size (in bytes) of MCP tool response content after JSON serialization.
300/// Responses exceeding this limit are rejected with a clear error telling the
301/// agent to narrow its query. Keeps responses within LLM context window limits.
302pub const MCP_MAX_RESPONSE_SIZE: Config<usize> = Config::new(
303    "mcp_max_response_size",
304    1_000_000,
305    "Maximum size in bytes of MCP tool response content. Responses exceeding this limit are rejected with an error telling the agent to narrow its query.",
306    ParameterScope::Environment,
307);
308
309/// Maximum time an MCP request may run before it is aborted and a timeout
310/// error is returned to the client.
311pub const MCP_REQUEST_TIMEOUT: Config<Duration> = Config::new(
312    "mcp_request_timeout",
313    Duration::from_secs(60),
314    "Maximum time an MCP request may run before it is aborted with a timeout error.",
315    ParameterScope::Environment,
316);
317
318/// Maximum size (in bytes) of a webhook request body, measured after
319/// decompression. Requests whose body exceeds this limit are rejected with
320/// HTTP 413. Applies only to the webhook route; other HTTP routes use a
321/// separate static limit.
322pub const WEBHOOK_MAX_REQUEST_SIZE_BYTES: Config<usize> = Config::new(
323    "webhook_max_request_size_bytes",
324    // Matches `MAX_REQUEST_SIZE`, the static limit the other environmentd HTTP routes use.
325    5 * 1024 * 1024,
326    "The maximum size in bytes of a webhook request body, measured after decompression.",
327    ParameterScope::Environment,
328);
329
330/// Maximum temporary storage a webhook `CHECK` expression may allocate while
331/// validating one request. A `CHECK` that exceeds it fails the request with HTTP
332/// 400 rather than holding the memory.
333///
334/// A `CHECK` can allocate a multiple of the request body, and `environmentd`
335/// evaluates one per in-flight request. Without a bound proportionate to the
336/// request, bounded network input becomes unbounded heap on a process shared by
337/// every connection. The default is 4x `WEBHOOK_MAX_REQUEST_SIZE_BYTES`, well
338/// above what a realistic `CHECK` (an HMAC, a `decode`, a `concat` with a
339/// secret) needs and well below the 100 MiB per-call ceiling used in a cluster.
340///
341/// NOTE: this is runtime-reconfigurable, so it must only bound a single webhook
342/// validation. Do not feed it (or any mutable budget) to a `RowArena` used in a
343/// compute dataflow (see `mz_repr::RowArena::with_budget`).
344pub const WEBHOOK_VALIDATION_MEMORY_BUDGET_BYTES: Config<usize> = Config::new(
345    "webhook_validation_memory_budget_bytes",
346    20 * 1024 * 1024,
347    "The maximum bytes of temporary storage a webhook CHECK expression may allocate while validating one request.",
348    ParameterScope::Environment,
349);
350
351/// Budget for the backlog a `SUBSCRIBE` (or `COPY (SUBSCRIBE ...) TO STDOUT`)
352/// may accumulate in environmentd while waiting for a slow client to read.
353///
354/// The subscribe producer runs on the non-blockable coordinator loop, so it
355/// cannot apply backpressure to a slow client. Instead the coordinator retires
356/// the subscribe once its buffered backlog exceeds this budget, bounding the
357/// memory a slow client can make the shared process hold.
358///
359/// The backlog excludes the message the client is currently draining, so this
360/// bounds the accumulation of messages, not the size of any single one.
361/// `max_result_size` is what bounds an individual message. A client that keeps
362/// up holds at most one message at a time, so it stays at a zero backlog and a
363/// large snapshot batch is delivered rather than retired.
364pub const SUBSCRIBE_MAX_BUFFERED_BYTES: Config<usize> = Config::new(
365    "subscribe_max_buffered_bytes",
366    128 * 1024 * 1024,
367    "Maximum bytes a SUBSCRIBE may buffer in environmentd for a slow client before it is retired with an error.",
368    ParameterScope::Environment,
369);
370
371/// Number of user IDs to pre-allocate in a batch. Pre-allocating IDs avoids
372/// a persist write + oracle call per DDL statement.
373pub const USER_ID_POOL_BATCH_SIZE: Config<u32> = Config::new(
374    "user_id_pool_batch_size",
375    512,
376    "Number of user IDs to pre-allocate in a batch for DDL operations.",
377    ParameterScope::Environment,
378);
379
380/// Maximum number of txns-shard write attempts before rebuilding `environmentd`.
381///
382/// The effective minimum is one attempt.
383pub const GROUP_COMMIT_MAX_ATTEMPTS: Config<usize> = Config::new(
384    "group_commit_max_attempts",
385    100,
386    "Maximum number of txns-shard write attempts before rebuilding environmentd. Values below 1 are treated as 1.",
387    ParameterScope::Environment,
388);
389
390/// OIDC client ID for the web console.
391pub const CONSOLE_OIDC_CLIENT_ID: Config<&'static str> = Config::new(
392    "console_oidc_client_id",
393    "",
394    "OIDC client ID for the web console.",
395    ParameterScope::Environment,
396);
397
398/// Space-separated OIDC scopes requested by the web console.
399pub const CONSOLE_OIDC_SCOPES: Config<&'static str> = Config::new(
400    "console_oidc_scopes",
401    "",
402    "Space-separated OIDC scopes requested by the web console.",
403    ParameterScope::Environment,
404);
405
406/// Interval at which to collect per-object arrangement size snapshots for the history table.
407pub const ARRANGEMENT_SIZE_HISTORY_COLLECTION_INTERVAL: Config<Duration> = Config::new(
408    "arrangement_size_history_collection_interval",
409    // Disabled by default until https://github.com/MaterializeInc/materialize/pull/37455 lands.
410    Duration::ZERO,
411    "Interval at which to collect and snapshot per-object arrangement sizes \
412     into mz_internal.mz_object_arrangement_size_history.",
413    ParameterScope::Environment,
414);
415
416/// How long to retain per-object arrangement size history.
417pub const ARRANGEMENT_SIZE_HISTORY_RETENTION_PERIOD: Config<Duration> = Config::new(
418    "arrangement_size_history_retention_period",
419    Duration::from_hours(7 * 24),
420    "How long to retain rows in mz_internal.mz_object_arrangement_size_history.",
421    ParameterScope::Environment,
422);
423
424/// How often to sweep replicas for completed object hydration episodes.
425pub const HYDRATION_HISTORY_COLLECTION_INTERVAL: Config<Duration> = Config::new(
426    "hydration_history_collection_interval",
427    Duration::ZERO,
428    "How often to record completed object hydration episodes. A zero duration disables collection.",
429    ParameterScope::Environment,
430);
431
432/// How long to retain completed object and replica hydration episodes.
433pub const HYDRATION_HISTORY_RETENTION_PERIOD: Config<Duration> = Config::new(
434    "hydration_history_retention_period",
435    Duration::from_hours(30 * 24),
436    "How long to retain rows in mz_internal.mz_object_hydration_history and mz_internal.mz_replica_hydration_history.",
437    ParameterScope::Environment,
438);
439
440/// How frequently the catalog `*_info` metrics (`mz_object_info`,
441/// `mz_cluster_info`, …) are reconciled with the catalog. A zero duration
442/// disables reconciliation.
443pub const CATALOG_INFO_METRICS_RECONCILE_INTERVAL: Config<Duration> = Config::new(
444    "catalog_info_metrics_reconcile_interval",
445    Duration::from_secs(30),
446    "How frequently to reconcile the catalog `*_info` metrics with the catalog. A zero duration disables reconciliation.",
447    ParameterScope::Environment,
448);
449
450/// Server-side `statement_timeout` to set on Postgres/CRDB connections used by
451/// the Postgres/CRDB timestamp oracle. A zero value leaves the statement
452/// timeout unset.
453pub const PG_TIMESTAMP_ORACLE_STATEMENT_TIMEOUT: Config<Duration> = Config::new(
454    "pg_timestamp_oracle_statement_timeout",
455    crate::timestamp_oracle::DEFAULT_PG_TIMESTAMP_ORACLE_STATEMENT_TIMEOUT,
456    "The server-side statement timeout to set on Postgres/CRDB connections used by the \
457    Postgres/CRDB timestamp oracle. A value of zero leaves the statement timeout unset.",
458    ParameterScope::Environment,
459);
460
461/// Cadence of the cluster controller's reconcile tick.
462pub const CLUSTER_CONTROLLER_TICK_INTERVAL: Config<Duration> = Config::new(
463    "cluster_controller_tick_interval",
464    Duration::from_secs(5),
465    "How often the cluster controller runs a reconcile tick.",
466    ParameterScope::Environment,
467);
468
469/// Whether a config-shape `ALTER CLUSTER` returns immediately, with the
470/// controller converging in the background, or blocks the session on a
471/// wait-shim until the reconfiguration completes or its deadline passes.
472///
473/// Defaults on. This is the break-glass switch back to the blocking wait-shim
474/// if returning immediately causes trouble.
475pub const ENABLE_BACKGROUND_ALTER_CLUSTER: Config<bool> = Config::new(
476    "enable_background_alter_cluster",
477    true,
478    "Whether a config-shape ALTER CLUSTER returns immediately (true) or the session blocks on a wait-shim over the durable reconfiguration record (false).",
479    ParameterScope::Environment,
480);
481
482/// The reconfiguration deadline written when a config-shape `ALTER CLUSTER`
483/// omits `WITH (WAIT ...)`. What happens when the deadline passes un-hydrated is
484/// the record's `on_timeout` action.
485pub const DEFAULT_CLUSTER_RECONFIGURATION_TIMEOUT: Config<Duration> = Config::new(
486    "default_cluster_reconfiguration_timeout",
487    Duration::from_secs(60 * 60 * 24),
488    "The reconfiguration deadline written when a config-shape ALTER CLUSTER omits WITH (WAIT ...).",
489    ParameterScope::Environment,
490);
491
492/// Break-glass for the hydration-burst strategy: when off the controller never
493/// runs a burst replica; graceful reconfiguration and `ON REFRESH` scheduling
494/// are unaffected.
495///
496/// A cluster can only carry an `AUTO SCALING STRATEGY` while its SQL acceptance
497/// feature flag is on, so this is the second of the two gates burst sits
498/// behind.
499pub const ENABLE_HYDRATION_BURST: Config<bool> = Config::new(
500    "enable_hydration_burst",
501    true,
502    "Whether the cluster controller's hydration-burst strategy may run a burst replica (break-glass; leaves graceful reconfiguration and ON REFRESH untouched).",
503    ParameterScope::Environment,
504);
505
506/// The burst-replica linger duration written into a new `burst` record when the
507/// cluster's `AUTO SCALING STRATEGY` omits `LINGER DURATION`. The burst replica
508/// stays up this long after the steady-state replicas first hydrate.
509pub const DEFAULT_HYDRATION_BURST_LINGER: Config<Duration> = Config::new(
510    "default_hydration_burst_linger",
511    Duration::from_secs(0),
512    "The burst-replica linger duration written when an AUTO SCALING STRATEGY omits LINGER DURATION.",
513    ParameterScope::Environment,
514);
515
516pub const FRONTEND_READ_THEN_WRITE: Config<bool> = Config::new(
517    "enable_adapter_frontend_occ_read_then_write",
518    false,
519    "Use frontend sequencing (with optimistic concurrency control) for \
520     DELETE, UPDATE, and INSERT operations. Read at startup, so changing it \
521     takes effect on the next restart.",
522    ParameterScope::Environment,
523);
524
525/// Adds the full set of all adapter `Config`s.
526pub fn all_dyncfgs(configs: ConfigSet) -> ConfigSet {
527    configs
528        .add(&ALLOW_USER_SESSIONS)
529        .add(&CLUSTER_CONTROLLER_TICK_INTERVAL)
530        .add(&ENABLE_BACKGROUND_ALTER_CLUSTER)
531        .add(&DEFAULT_CLUSTER_RECONFIGURATION_TIMEOUT)
532        .add(&ENABLE_HYDRATION_BURST)
533        .add(&DEFAULT_HYDRATION_BURST_LINGER)
534        .add(&WITH_0DT_DEPLOYMENT_MAX_WAIT)
535        .add(&WITH_0DT_DEPLOYMENT_DDL_CHECK_INTERVAL)
536        .add(&ENABLE_0DT_DEPLOYMENT_PANIC_AFTER_TIMEOUT)
537        .add(&WITH_0DT_DEPLOYMENT_CAUGHT_UP_CHECK_INTERVAL)
538        .add(&WITH_0DT_CAUGHT_UP_CHECK_ALLOWED_LAG)
539        .add(&WITH_0DT_CAUGHT_UP_CHECK_CUTOFF)
540        .add(&ENABLE_0DT_CAUGHT_UP_REPLICA_STATUS_CHECK)
541        .add(&ENABLE_0DT_CAUGHT_UP_STABILITY_CHECK)
542        .add(&WITH_0DT_CAUGHT_UP_CHECK_STABILITY_PERIOD)
543        .add(&ENABLE_0DT_HYDRATE_MIGRATED_BUILTIN_MVS)
544        .add(&ENABLE_STATEMENT_LIFECYCLE_LOGGING)
545        .add(&ENABLE_INTROSPECTION_SUBSCRIBES)
546        .add(&ENABLE_FRONTEND_SUBSCRIBES)
547        .add(&PLAN_INSIGHTS_NOTICE_FAST_PATH_CLUSTERS_OPTIMIZE_DURATION)
548        .add(&ENABLE_EXPRESSION_CACHE)
549        .add(&ENABLE_PASSWORD_AUTH)
550        .add(&READ_THEN_WRITE_MAX_DEPENDENCIES)
551        .add(&OIDC_ISSUER)
552        .add(&OIDC_AUDIENCE)
553        .add(&OIDC_AUTHENTICATION_CLAIM)
554        .add(&OIDC_GROUP_ROLE_SYNC_ENABLED)
555        .add(&OIDC_GROUP_CLAIM)
556        .add(&OIDC_GROUP_ROLE_SYNC_STRICT)
557        .add(&PERSIST_FAST_PATH_ORDER)
558        .add(&ENABLE_S3_TABLES_REGION_CHECK)
559        .add(&ENABLE_MCP_AGENT)
560        .add(&ENABLE_MCP_AGENT_QUERY_TOOL)
561        .add(&ENABLE_MCP_AGENT_READ_DATA_PRODUCT_TOOL)
562        .add(&ENABLE_MCP_DEVELOPER)
563        .add(&ENABLE_MCP_DEVELOPER_QUERY_TOOL)
564        .add(&ENABLE_PUBLIC_METRICS_ENDPOINT)
565        .add(&MCP_MAX_RESPONSE_SIZE)
566        .add(&MCP_REQUEST_TIMEOUT)
567        .add(&WEBHOOK_MAX_REQUEST_SIZE_BYTES)
568        .add(&WEBHOOK_VALIDATION_MEMORY_BUDGET_BYTES)
569        .add(&SUBSCRIBE_MAX_BUFFERED_BYTES)
570        .add(&USER_ID_POOL_BATCH_SIZE)
571        .add(&GROUP_COMMIT_MAX_ATTEMPTS)
572        .add(&CONSOLE_OIDC_CLIENT_ID)
573        .add(&CONSOLE_OIDC_SCOPES)
574        .add(&ARRANGEMENT_SIZE_HISTORY_COLLECTION_INTERVAL)
575        .add(&ARRANGEMENT_SIZE_HISTORY_RETENTION_PERIOD)
576        .add(&HYDRATION_HISTORY_COLLECTION_INTERVAL)
577        .add(&HYDRATION_HISTORY_RETENTION_PERIOD)
578        .add(&CATALOG_INFO_METRICS_RECONCILE_INTERVAL)
579        .add(&PG_TIMESTAMP_ORACLE_STATEMENT_TIMEOUT)
580        .add(&FRONTEND_READ_THEN_WRITE)
581}