VTGate/foreign keys stress test: add tests for 'standard' replica #14747
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
#13799 introduced VTGate stress tests for foreign keys, and #14098 further improved them. Among the techniques used, we set up a primary with foreign key tables, and a replica where we stripped out the foreign key constraints. This setup validated that VTGate's cascading of foreign key rules works correctly, by comparing data on primary and replica.
This PR adds an additional replica, this time a standard, "faithful" one. The objective with this replica is to validate that the schema on primary and replica are consistent after Online DDL. This is something we can't do with the already existing replica as we intentionally diverged the schema on that replica in the first place.
The test compares the new, "faithful" replica with the primary, expected identical schema, explicitly makes sure that foreign key referenced tables are pinned to the correct primaries (validating the effects of
rename_table_preserve_foreign_key
) and of course also validates that the data is identical.We are modifying the behavior of
rename_table_preserve_foreign_key
in our public fork. The tests are expected tofail right away and to pass once we've updated the forked MySQL imagepass as we're not yet using the forked MySQL image in this repo's CI.Related Issue(s)
#11975
Checklist
Deployment Notes