sql: add a test that verifies that the system database schema version is correct after upgrade #121914
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
P-2
Issues/test failures with a fix SLA of 3 months
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
In the 23.2 release cycle, #104714 added a system table but the upgrade does not bump the system database schema version. The PR does change the bootstrap version, so depending on whether we created a cluster on 23.2 or upgraded a cluster from 23.1, we end up with a different schema version.
To prevent this in the future, we should have a test that upgrades a cluster from the previous version and then asserts that the system database schema version is the same as the bootstrap version.
Somewhat related - it's a bit unfortunate that the schema version is an upgrade version (e.g 23.1-32) which will later require special code to determine if this version is acceptable given a minimum supported cluster version of 23.2. It would be ideal if the final schema version matches the latest cluster version. Perhaps the final upgrade step could always be a "finalize schema version" where we bump the version to the bootstrap version.
Jira issue: CRDB-37616
Epic CRDB-37763
The text was updated successfully, but these errors were encountered: