Skip to content

Commit

Permalink
ts: remove mentions of old deprecated settings
Browse files Browse the repository at this point in the history
This commit removes all mentions of
`timeseries.storage.10s_resolution_ttl` and
`timeseries.storage.30m_resolution_ttl` cluster settings that have been
deprecated long time ago. I believe they were kept around due to the
migration, but the permanent upgrades introduced in
399e56b seem to have removed the need
for that.

Release note: None
  • Loading branch information
yuzefovich committed Jul 18, 2023
1 parent d3c4f16 commit cd10174
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
2 changes: 0 additions & 2 deletions docs/tech-notes/version_upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ Here are the remaining uses:
- auto-generate a random UUID for `cluster.secret`.
- block the node startup if a user/role with name `public` is present in `system.users`.
- create the `defaultdb` and `postgres` empty databases.
- copy the values from the old `timeseries.storage.10s_resolution_ttl` and `timeseries.storage.30m_resolution_ttl` settings
to their new setting names.
- add the default lat/long entries to `system.locations`.
- add the `CREATELOGIN` option to roles that already have the `CREATEROLE` role option.

Expand Down
1 change: 1 addition & 0 deletions pkg/settings/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ var retiredSettings = map[string]struct{}{
"changefeed.replan_flow_frequency": {},
"changefeed.replan_flow_threshold": {},
"jobs.trace.force_dump_mode": {},
"timeseries.storage.30m_resolution_ttl": {},
}

// sqlDefaultSettings is the list of "grandfathered" existing sql.defaults
Expand Down
5 changes: 0 additions & 5 deletions pkg/sql/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1285,11 +1285,6 @@ func TestLintClusterSettingNames(t *testing.T) {
"sql.metrics.statement_details.sample_logical_plans": `sql.metrics.statement_details.sample_logical_plans: use .enabled for booleans`,
"sql.trace.log_statement_execute": `sql.trace.log_statement_execute: use .enabled for booleans`,
"trace.debug.enable": `trace.debug.enable: use .enabled for booleans`,
// These two settings have been deprecated in favor of a new (better named) setting
// but the old name is still around to support migrations.
// TODO(knz): remove these cases when these settings are retired.
"timeseries.storage.10s_resolution_ttl": `timeseries.storage.10s_resolution_ttl: part "10s_resolution_ttl" has invalid structure`,
"timeseries.storage.30m_resolution_ttl": `timeseries.storage.30m_resolution_ttl: part "30m_resolution_ttl" has invalid structure`,

// These use the _timeout suffix to stay consistent with the
// corresponding session variables.
Expand Down
18 changes: 0 additions & 18 deletions pkg/ts/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,6 @@ var Resolution10sStorageTTL = settings.RegisterDurationSetting(
resolution10sDefaultRollupThreshold,
).WithPublic()

// deprecatedResolution30StoreDuration is retained for backward compatibility during a version upgrade.
var deprecatedResolution30StoreDuration = func() *settings.DurationSetting {
s := settings.RegisterDurationSetting(
settings.TenantWritable,
"timeseries.storage.30m_resolution_ttl", "replaced by timeseries.storage.resolution_30m.ttl",
resolution30mDefaultPruneThreshold,
)
s.SetRetired()
return s
}()

func init() {
// The setting is not used any more, but we need to keep its
// definition for backward compatibility until the next release
// cycle.
_ = deprecatedResolution30StoreDuration
}

// Resolution30mStorageTTL defines the maximum age of data that will be
// retained at he 30 minute resolution. Data older than this is subject to
// deletion.
Expand Down

0 comments on commit cd10174

Please sign in to comment.