schemachanger: better concurrency testing #107223
Labels
A-schema-changes
A-testing
Testing tools and infrastructure
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
db-cy-23
quality-friday
A good issue to work on on Quality Friday
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
When interpreting DDL statements, the declarative schema changer checks that there are no concurrent schema changes on the affected descriptors. This effectively acquires an exclusive lock on those descriptors.
We've had bugs like #106487 for which it has been difficult to validate the fix other than by running a workload, which is unfortunate. We should instead have an integration test in the form of a go test, in which a bunch of various schema changes fire up concurrently on the same limited set of descriptors.
For example:
The fully qualified names of the tables can be retrieved in each transaction and fmt.Sprint-ed into the DDL statement by looking up the descriptors by ID because the IDs don't change.
This is just a general idea, we haven't implemented RENAME TO statements in the declarative schema changer as of yet.
Jira issue: CRDB-29951
The text was updated successfully, but these errors were encountered: