Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions src/sql/src/session/vars/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,8 @@ pub static PG_SOURCE_TCP_KEEPALIVES_INTERVAL: VarDefinition = VarDefinition::new
"Sets the time interval between TCP keepalive probes when connecting to PG via \
replication (Materialize).",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

/// Sets the TCP user timeout when connecting to PG via `mz_postgres_util`.
pub static PG_SOURCE_TCP_USER_TIMEOUT: VarDefinition = VarDefinition::new(
Expand Down Expand Up @@ -1061,15 +1062,17 @@ pub static SSH_CHECK_INTERVAL: VarDefinition = VarDefinition::new(
value!(Duration; mz_ssh_util::tunnel::DEFAULT_CHECK_INTERVAL),
"Controls the check interval for connections to SSH bastions via `mz_ssh_util`.",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

/// Controls the connect timeout for connections to SSH bastions via `mz_ssh_util`.
pub static SSH_CONNECT_TIMEOUT: VarDefinition = VarDefinition::new(
"ssh_connect_timeout",
value!(Duration; mz_ssh_util::tunnel::DEFAULT_CONNECT_TIMEOUT),
"Controls the connect timeout for connections to SSH bastions via `mz_ssh_util`.",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

/// Controls the keepalive idle interval for connections to SSH bastions via `mz_ssh_util`.
pub static SSH_KEEPALIVES_IDLE: VarDefinition = VarDefinition::new(
Expand Down Expand Up @@ -1193,7 +1196,8 @@ pub static STORAGE_STATISTICS_INTERVAL: VarDefinition = VarDefinition::new(
"The interval to submit statistics to `mz_source_statistics_per_worker` \
and `mz_sink_statistics` (Materialize).",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

/// The interval to collect statistics for `mz_source_statistics_per_worker` and `mz_sink_statistics_per_worker` in
/// clusterd. Controls the accuracy of metrics.
Expand All @@ -1204,7 +1208,8 @@ pub static STORAGE_STATISTICS_COLLECTION_INTERVAL: VarDefinition = VarDefinition
and `mz_sink_statistics_per_worker` in clusterd. Controls the accuracy of metrics \
(Materialize).",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

pub static STORAGE_RECORD_SOURCE_SINK_NAMESPACED_ERRORS: VarDefinition = VarDefinition::new(
"storage_record_source_sink_namespaced_errors",
Expand Down Expand Up @@ -1532,7 +1537,8 @@ pub mod grpc_client {
value!(Duration; Duration::from_secs(3)),
"Idle time to wait before sending HTTP/2 PINGs to maintain established gRPC client connections.",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

pub static HTTP2_KEEP_ALIVE_TIMEOUT: VarDefinition = VarDefinition::new(
"grpc_client_http2_keep_alive_timeout",
Expand Down Expand Up @@ -1633,7 +1639,8 @@ pub mod cluster_scheduling {
value!(Duration; DEFAULT_CLUSTER_ALTER_CHECK_READY_INTERVAL),
"How often to poll readiness checks for cluster alter",
false,
);
)
.with_constraint(&NON_ZERO_DURATION);

const DEFAULT_CHECK_SCHEDULING_POLICIES_INTERVAL: Duration = Duration::from_secs(3);

Expand Down
5 changes: 5 additions & 0 deletions test/sqllogictest/alter.slt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ ALTER SYSTEM SET default_timestamp_interval = '0';
----
db error: ERROR: parameter "default_timestamp_interval" cannot have value "0ns": only supports non-zero durations

simple conn=mz_system,user=mz_system
ALTER SYSTEM SET storage_statistics_interval = '0s';
----
db error: ERROR: parameter "storage_statistics_interval" cannot have value "0ns": only supports non-zero durations

simple conn=mz_system,user=mz_system
ALTER SYSTEM SET default_timestamp_interval = '-1';
----
Expand Down
Loading