Skip to content

Commit

Permalink
Merge #139632
Browse files Browse the repository at this point in the history
139632: upgrades: remove redundant `ensureSQLSchemaTelemetrySchedule` permanent upgrade r=rafiss a=shubhamdhama

During startup, `CreateSchemaTelemetrySchedule`, which creates the scheduled job to collect schema telemetry, is redundantly invoked twice concurrently: once via `schematelemetrycontroller.Controller.Start` and also through the `ensureSQLSchemaTelemetrySchedule` permanent upgrade.

This was identified in #119340, where the permanent upgrade encounters contention and is resolved nearly 30 seconds later causing slow startup of the tenant. Although the exact reason for the prolonged transaction deadlock is unclear, we can still benefit by removing this redundant upgrade.

Informs: #119340
Closes: #130931

Release note: None

Epic: none

Co-authored-by: Shubham Dhama <[email protected]>
  • Loading branch information
craig[bot] and shubhamdhama committed Jan 24, 2025
2 parents 8ad1c13 + f04bdb7 commit 8e81611
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 142 deletions.
7 changes: 0 additions & 7 deletions pkg/upgrade/upgrades/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ go_library(
"first_upgrade.go",
"permanent_create_jobs_metrics_polling_job.go",
"permanent_create_update_table_metadata_cache_job.go",
"permanent_ensure_sql_schema_telemetry_schedule.go",
"permanent_key_visualizer_migration.go",
"permanent_maybe_setup_pcr_reader.go",
"permanent_mvcc_statistics_migration.go",
Expand Down Expand Up @@ -44,7 +43,6 @@ go_library(
"//pkg/sql/catalog/lease",
"//pkg/sql/catalog/nstree",
"//pkg/sql/catalog/replication",
"//pkg/sql/catalog/schematelemetry/schematelemetrycontroller",
"//pkg/sql/catalog/systemschema",
"//pkg/sql/catalog/tabledesc",
"//pkg/sql/isql",
Expand Down Expand Up @@ -74,7 +72,6 @@ go_test(
"helpers_test.go",
"main_test.go",
"permanent_create_jobs_metrics_polling_job_test.go",
"permanent_ensure_sql_schema_telemetry_schedule_test.go",
"permanent_mvcc_statistics_migration_test.go",
"permanent_sql_stats_ttl_test.go",
"permanent_system_activity_update_job_test.go",
Expand All @@ -98,7 +95,6 @@ go_test(
"//pkg/keys",
"//pkg/kv",
"//pkg/roachpb",
"//pkg/scheduledjobs",
"//pkg/security/securityassets",
"//pkg/security/securitytest",
"//pkg/security/username",
Expand All @@ -116,12 +112,10 @@ go_test(
"//pkg/sql/catalog/funcdesc",
"//pkg/sql/catalog/lease",
"//pkg/sql/catalog/schemadesc",
"//pkg/sql/catalog/schematelemetry/schematelemetrycontroller",
"//pkg/sql/catalog/systemschema",
"//pkg/sql/catalog/tabledesc",
"//pkg/sql/isql",
"//pkg/sql/privilege",
"//pkg/sql/sem/builtins/builtinconstants",
"//pkg/sql/sem/eval",
"//pkg/sql/sem/tree",
"//pkg/sql/types",
Expand All @@ -139,7 +133,6 @@ go_test(
"//pkg/util/log",
"//pkg/util/protoutil",
"//pkg/util/retry",
"//pkg/util/timeutil",
"@com_github_cockroachdb_cockroach_go_v2//crdb",
"@com_github_cockroachdb_errors//:errors",
"@com_github_stretchr_testify//assert",
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion pkg/upgrade/upgrades/permanent_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func bootstrapCluster(
{"initialize the cluster.secret setting", initializeClusterSecret},
{"update system.locations with default location data", updateSystemLocationData},
{"create default databases", createDefaultDbs},
{"add default SQL schema telemetry schedule", ensureSQLSchemaTelemetrySchedule},
{"create jobs metrics polling job", createJobsMetricsPollingJob},
{"create sql activity updater job", createActivityUpdateJobMigration},
{"create mvcc stats job", createMVCCStatisticsJob},
Expand Down

0 comments on commit 8e81611

Please sign in to comment.