-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql,systemschema,migration: add
system.long_running_migrations
, adopt
This commit adds a table, `system.long_running_migrations`, to store the completion status of long-running migrations. This table is used to ensure safety and isolation in the face of concurrent attempts to upgrade the cluster version. An important facet of this change is the migration to add this table to the cluster during upgrades. Given that the implementation of long-running migrations relies on the table's existence, all versions which are associated with long-running migrations must follow the version which introduces this table. This migration needs to utilize the new infrastructure rather than the `sqlmigrations` infrastructure because of some really bad behavior introduced in 20.2 (#59850). Given two such versions already existed, they have been assigned new version keys and their old version keys and values are now merely placeholders. This provides comptability with the earlier alphas. Release note: None
- Loading branch information
Showing
47 changed files
with
1,171 additions
and
565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
doctor cluster | ||
---- | ||
debug doctor cluster | ||
Examining 34 descriptors and 35 namespace entries... | ||
Examining 35 descriptors and 36 namespace entries... | ||
Table 53: ParentID 50, ParentSchemaID 29, Name 'foo': not being dropped but no namespace entry found | ||
Examining 1 running jobs... | ||
ERROR: validation failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ requesting goroutine files for node 1... writing: debug/nodes/1/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/1/ranges/1.json | ||
writing: debug/nodes/1/ranges/2.json | ||
writing: debug/nodes/1/ranges/3.json | ||
|
@@ -94,6 +94,7 @@ writing: debug/nodes/1/ranges/32.json | |
writing: debug/nodes/1/ranges/33.json | ||
writing: debug/nodes/1/ranges/34.json | ||
writing: debug/nodes/1/ranges/35.json | ||
writing: debug/nodes/1/ranges/36.json | ||
writing: debug/nodes/2/status.json | ||
using SQL connection URL for node 2: postgresql://... | ||
retrieving SQL data for crdb_internal.feature_usage... writing: debug/nodes/2/crdb_internal.feature_usage.txt | ||
|
@@ -194,7 +195,7 @@ requesting goroutine files for node 3... writing: debug/nodes/3/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/3/ranges/1.json | ||
writing: debug/nodes/3/ranges/2.json | ||
writing: debug/nodes/3/ranges/3.json | ||
|
@@ -230,6 +231,7 @@ writing: debug/nodes/3/ranges/32.json | |
writing: debug/nodes/3/ranges/33.json | ||
writing: debug/nodes/3/ranges/34.json | ||
writing: debug/nodes/3/ranges/35.json | ||
writing: debug/nodes/3/ranges/36.json | ||
doctor examining cluster...No problems found! | ||
writing: debug/reports/doctor.txt | ||
requesting list of SQL databases... 3 found | ||
|
@@ -238,7 +240,7 @@ requesting database details for defaultdb... writing: debug/schema/defaultdb@det | |
requesting database details for postgres... writing: debug/schema/[email protected] | ||
0 tables found | ||
requesting database details for system... writing: debug/schema/[email protected] | ||
29 tables found | ||
30 tables found | ||
requesting table details for system.public.namespace... writing: debug/schema/system/public_namespace.json | ||
requesting table details for system.public.descriptor... writing: debug/schema/system/public_descriptor.json | ||
requesting table details for system.public.users... writing: debug/schema/system/public_users.json | ||
|
@@ -268,5 +270,6 @@ requesting table details for system.public.statement_diagnostics_requests... wri | |
requesting table details for system.public.statement_diagnostics... writing: debug/schema/system/public_statement_diagnostics.json | ||
requesting table details for system.public.scheduled_jobs... writing: debug/schema/system/public_scheduled_jobs.json | ||
requesting table details for system.public.sqlliveness... writing: debug/schema/system/public_sqlliveness.json | ||
requesting table details for system.public.long_running_migrations... writing: debug/schema/system/public_long_running_migrations.json | ||
writing: debug/pprof-summary.sh | ||
writing: debug/hot-ranges.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ requesting goroutine files for node 1... writing: debug/nodes/1/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/1/ranges/1.json | ||
writing: debug/nodes/1/ranges/2.json | ||
writing: debug/nodes/1/ranges/3.json | ||
|
@@ -94,6 +94,7 @@ writing: debug/nodes/1/ranges/32.json | |
writing: debug/nodes/1/ranges/33.json | ||
writing: debug/nodes/1/ranges/34.json | ||
writing: debug/nodes/1/ranges/35.json | ||
writing: debug/nodes/1/ranges/36.json | ||
writing: debug/nodes/2.skipped | ||
writing: debug/nodes/3/status.json | ||
using SQL connection URL for node 3: postgresql://... | ||
|
@@ -125,7 +126,7 @@ requesting goroutine files for node 3... writing: debug/nodes/3/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/3/ranges/1.json | ||
writing: debug/nodes/3/ranges/2.json | ||
writing: debug/nodes/3/ranges/3.json | ||
|
@@ -161,6 +162,7 @@ writing: debug/nodes/3/ranges/32.json | |
writing: debug/nodes/3/ranges/33.json | ||
writing: debug/nodes/3/ranges/34.json | ||
writing: debug/nodes/3/ranges/35.json | ||
writing: debug/nodes/3/ranges/36.json | ||
doctor examining cluster...No problems found! | ||
writing: debug/reports/doctor.txt | ||
requesting list of SQL databases... 3 found | ||
|
@@ -169,7 +171,7 @@ requesting database details for defaultdb... writing: debug/schema/defaultdb@det | |
requesting database details for postgres... writing: debug/schema/[email protected] | ||
0 tables found | ||
requesting database details for system... writing: debug/schema/[email protected] | ||
29 tables found | ||
30 tables found | ||
requesting table details for system.public.namespace... writing: debug/schema/system/public_namespace.json | ||
requesting table details for system.public.descriptor... writing: debug/schema/system/public_descriptor.json | ||
requesting table details for system.public.users... writing: debug/schema/system/public_users.json | ||
|
@@ -199,5 +201,6 @@ requesting table details for system.public.statement_diagnostics_requests... wri | |
requesting table details for system.public.statement_diagnostics... writing: debug/schema/system/public_statement_diagnostics.json | ||
requesting table details for system.public.scheduled_jobs... writing: debug/schema/system/public_scheduled_jobs.json | ||
requesting table details for system.public.sqlliveness... writing: debug/schema/system/public_sqlliveness.json | ||
requesting table details for system.public.long_running_migrations... writing: debug/schema/system/public_long_running_migrations.json | ||
writing: debug/pprof-summary.sh | ||
writing: debug/hot-ranges.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ requesting goroutine files for node 1... writing: debug/nodes/1/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/1/ranges/1.json | ||
writing: debug/nodes/1/ranges/2.json | ||
writing: debug/nodes/1/ranges/3.json | ||
|
@@ -94,6 +94,7 @@ writing: debug/nodes/1/ranges/32.json | |
writing: debug/nodes/1/ranges/33.json | ||
writing: debug/nodes/1/ranges/34.json | ||
writing: debug/nodes/1/ranges/35.json | ||
writing: debug/nodes/1/ranges/36.json | ||
writing: debug/nodes/3/status.json | ||
using SQL connection URL for node 3: postgresql://... | ||
retrieving SQL data for crdb_internal.feature_usage... writing: debug/nodes/3/crdb_internal.feature_usage.txt | ||
|
@@ -124,7 +125,7 @@ requesting goroutine files for node 3... writing: debug/nodes/3/goroutines.err.t | |
^- resulted in ... | ||
requesting log file ... | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/3/ranges/1.json | ||
writing: debug/nodes/3/ranges/2.json | ||
writing: debug/nodes/3/ranges/3.json | ||
|
@@ -160,6 +161,7 @@ writing: debug/nodes/3/ranges/32.json | |
writing: debug/nodes/3/ranges/33.json | ||
writing: debug/nodes/3/ranges/34.json | ||
writing: debug/nodes/3/ranges/35.json | ||
writing: debug/nodes/3/ranges/36.json | ||
doctor examining cluster...No problems found! | ||
writing: debug/reports/doctor.txt | ||
requesting list of SQL databases... 3 found | ||
|
@@ -168,7 +170,7 @@ requesting database details for defaultdb... writing: debug/schema/defaultdb@det | |
requesting database details for postgres... writing: debug/schema/[email protected] | ||
0 tables found | ||
requesting database details for system... writing: debug/schema/[email protected] | ||
29 tables found | ||
30 tables found | ||
requesting table details for system.public.namespace... writing: debug/schema/system/public_namespace.json | ||
requesting table details for system.public.descriptor... writing: debug/schema/system/public_descriptor.json | ||
requesting table details for system.public.users... writing: debug/schema/system/public_users.json | ||
|
@@ -198,5 +200,6 @@ requesting table details for system.public.statement_diagnostics_requests... wri | |
requesting table details for system.public.statement_diagnostics... writing: debug/schema/system/public_statement_diagnostics.json | ||
requesting table details for system.public.scheduled_jobs... writing: debug/schema/system/public_scheduled_jobs.json | ||
requesting table details for system.public.sqlliveness... writing: debug/schema/system/public_sqlliveness.json | ||
requesting table details for system.public.long_running_migrations... writing: debug/schema/system/public_long_running_migrations.json | ||
writing: debug/pprof-summary.sh | ||
writing: debug/hot-ranges.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ requesting table details for defaultdb.public."../system"... writing: debug/sche | |
requesting database details for postgres... writing: debug/schema/[email protected] | ||
0 tables found | ||
requesting database details for system... writing: debug/schema/[email protected] | ||
29 tables found | ||
30 tables found | ||
requesting table details for system.public.namespace... writing: debug/schema/system-1/public_namespace.json | ||
requesting table details for system.public.descriptor... writing: debug/schema/system-1/public_descriptor.json | ||
requesting table details for system.public.users... writing: debug/schema/system-1/public_users.json | ||
|
@@ -52,3 +52,4 @@ requesting table details for system.public.statement_diagnostics_requests... wri | |
requesting table details for system.public.statement_diagnostics... writing: debug/schema/system-1/public_statement_diagnostics.json | ||
requesting table details for system.public.scheduled_jobs... writing: debug/schema/system-1/public_scheduled_jobs.json | ||
requesting table details for system.public.sqlliveness... writing: debug/schema/system-1/public_sqlliveness.json | ||
requesting table details for system.public.long_running_migrations... writing: debug/schema/system-1/public_long_running_migrations.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ requesting heap profile for node 1... writing: debug/nodes/1/heap.pprof | |
requesting heap files for node 1... ? found | ||
requesting goroutine files for node 1... 0 found | ||
requesting log file ... | ||
requesting ranges... 35 found | ||
requesting ranges... 36 found | ||
writing: debug/nodes/1/ranges/1.json | ||
writing: debug/nodes/1/ranges/2.json | ||
writing: debug/nodes/1/ranges/3.json | ||
|
@@ -93,6 +93,7 @@ writing: debug/nodes/1/ranges/32.json | |
writing: debug/nodes/1/ranges/33.json | ||
writing: debug/nodes/1/ranges/34.json | ||
writing: debug/nodes/1/ranges/35.json | ||
writing: debug/nodes/1/ranges/36.json | ||
doctor examining cluster...No problems found! | ||
writing: debug/reports/doctor.txt | ||
requesting list of SQL databases... 3 found | ||
|
@@ -101,7 +102,7 @@ requesting database details for defaultdb... writing: debug/schema/defaultdb@det | |
requesting database details for postgres... writing: debug/schema/[email protected] | ||
0 tables found | ||
requesting database details for system... writing: debug/schema/[email protected] | ||
29 tables found | ||
30 tables found | ||
requesting table details for system.public.namespace... writing: debug/schema/system/public_namespace.json | ||
requesting table details for system.public.descriptor... writing: debug/schema/system/public_descriptor.json | ||
requesting table details for system.public.users... writing: debug/schema/system/public_users.json | ||
|
@@ -131,5 +132,6 @@ requesting table details for system.public.statement_diagnostics_requests... wri | |
requesting table details for system.public.statement_diagnostics... writing: debug/schema/system/public_statement_diagnostics.json | ||
requesting table details for system.public.scheduled_jobs... writing: debug/schema/system/public_scheduled_jobs.json | ||
requesting table details for system.public.sqlliveness... writing: debug/schema/system/public_sqlliveness.json | ||
requesting table details for system.public.long_running_migrations... writing: debug/schema/system/public_long_running_migrations.json | ||
writing: debug/pprof-summary.sh | ||
writing: debug/hot-ranges.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.