From cd10174dcddbc50adb519383136af2e9d01dfa04 Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Mon, 17 Jul 2023 13:32:39 -0700 Subject: [PATCH] ts: remove mentions of old deprecated settings 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 399e56b3f56c0dce6c34525bebf58297be320083 seem to have removed the need for that. Release note: None --- docs/tech-notes/version_upgrades.md | 2 -- pkg/settings/registry.go | 1 + pkg/sql/show_test.go | 5 ----- pkg/ts/db.go | 18 ------------------ 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/docs/tech-notes/version_upgrades.md b/docs/tech-notes/version_upgrades.md index 10903b450a4f..55c3226028fa 100644 --- a/docs/tech-notes/version_upgrades.md +++ b/docs/tech-notes/version_upgrades.md @@ -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. diff --git a/pkg/settings/registry.go b/pkg/settings/registry.go index e151a2c976cb..ac47c5ba0ad7 100644 --- a/pkg/settings/registry.go +++ b/pkg/settings/registry.go @@ -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 diff --git a/pkg/sql/show_test.go b/pkg/sql/show_test.go index 83874db6be87..669fb9a4b330 100644 --- a/pkg/sql/show_test.go +++ b/pkg/sql/show_test.go @@ -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. diff --git a/pkg/ts/db.go b/pkg/ts/db.go index 667cd23e5eb0..dd5ceed48a7b 100644 --- a/pkg/ts/db.go +++ b/pkg/ts/db.go @@ -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.