migrations: populate initial version setting#17694
Conversation
d63ccb8 to
35854f9
Compare
This uses the previously added bootstrap version which is populated when a cluster running >1.0 is bootstrapped to populate the settings table. At the same time, prevent `SET CLUSTER SETTING version = 'x'` from working until that migration has run. This solves one remaining headache for [version migrations][1] by giving it authoritative information on the currently running cluster version during upgrades. Fixes cockroachdb#17389. [1]: cockroachdb#16977
|
Reviewed 8 of 8 files at r1, 8 of 8 files at r2. pkg/migration/sqlmigrations/migrations.go, line 416 at r2 (raw file):
Can this be Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/migration/sqlmigrations/migrations.go, line 416 at r2 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Yes, but I'd have to plumb more stuff onto Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/migration/sqlmigrations/migrations.go, line 416 at r2 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Leaving it is fine; I didn't realize this wasn't a full Comments from Reviewable |
|
TFTR, Ben! |
Add a bootstrap version which is populated when a cluster running >1.0 is
bootstrapped. Use it to populate the settings table via a sql migration. At the
same time, prevent
SET CLUSTER SETTING version = 'x'from working until thatmigration has run.
This solves one remaining headache for version migrations by giving it
authoritative information on the currently running cluster version during
upgrades.
Fixes #17389.