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
*: audit all duration settings to add validation function
This commit adjusts the DurationSetting so that if no validation
function is provided, it assumes the non-negative duration.
This commit audits all duration settings to add validation functions. In
vast majority cases non-negative duration seems reasonable, for three
I'm adding positive validation:
- `kv.gc.txn_cleanup_threshold`
- `jobs.scheduler.pace`
- `sql.stats.max_timestamp_age`.
`sql.crdb_internal.table_row_statistics.as_of_time` got a non-positive
validation.
Note that since we're adding new validation logic, it can be possible
for existing setting values to not pass the validation anymore. In such
case the default will be used instead (and a log message will be
written) which seems like a reasonable behavior.
Release note: None
Copy file name to clipboardExpand all lines: pkg/ccl/changefeedccl/changefeedbase/settings.go
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@ var TableDescriptorPollInterval = settings.RegisterDurationSetting(
23
23
"changefeed.experimental_poll_interval",
24
24
"polling interval for the table descriptors",
25
25
1*time.Second,
26
-
settings.NonNegativeDuration,
27
26
)
28
27
29
28
// DefaultMinCheckpointFrequency is the default frequency to flush sink.
@@ -53,7 +52,6 @@ var SlowSpanLogThreshold = settings.RegisterDurationSetting(
53
52
"changefeed.slow_span_log_threshold",
54
53
"a changefeed will log spans with resolved timestamps this far behind the current wall-clock time; if 0, a default value is calculated based on other cluster settings",
55
54
0,
56
-
settings.NonNegativeDuration,
57
55
)
58
56
59
57
// IdleTimeout controls how long the changefeed will wait for a new KV being
@@ -63,7 +61,6 @@ var IdleTimeout = settings.RegisterDurationSetting(
63
61
"changefeed.idle_timeout",
64
62
"a changefeed will mark itself idle if no changes have been emitted for greater than this duration; if 0, the changefeed will never be marked idle",
0 commit comments