forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
123084: upgrade: automatically bump the system DB version r=rafiss a=rafiss Rather than making authors of an upgrade remember that they should bump the version of the system DB schema, now it will be bumped automatically after any upgrade step that has a migration or if upgrading to the final cluster version for a release. Two tests are added: - TestSystemDatabaseSchemaBootstrapVersionBumped makes sure the SystemDatabaseSchemaBootstrapVersion is incremented whenever clusterversion.Latest changes AND if that version has an upgrade migration or is the final version in a release. - TestUpgradeHappensAfterMigrations is augmented to check that after all upgrades run, the actual system database schema version is equal to the SystemDatabaseSchemaBootstrapVersion. Taken together, these tests ensure that the system database bootstrap version is manually incremented in the code when it should be, and that the automatic upgrade process correctly increments the version. This change results in more work, since it means that the version will be bumped when it is not strictly necessary to do so. But since it makes it harder to forget a manual step, it seems worth doing. fixes cockroachdb#121914 Release note: None Co-authored-by: Rafi Shamim <[email protected]>
- Loading branch information
Showing
25 changed files
with
166 additions
and
95 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
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
Oops, something went wrong.