CopySchemaShard: apply changes with foreign key checks disabled#4722
CopySchemaShard: apply changes with foreign key checks disabled#4722dweitzman wants to merge 1 commit intovitessio:masterfrom
Conversation
|
Not yet tested |
7c3f75c to
fda5de4
Compare
sougou
left a comment
There was a problem hiding this comment.
Do you think it's better to do this at the beginning of SplitClone instead? And then, SplitClone can enable checks just before setting up vreplication.
I can accordingly change vreplication copy do the same thing.
|
CopySchemaShard will need to run before SplitClone, so it seems like they both need something like this. |
|
CopySchemaShard itself should succeed without the check, right? The tables have no data in them. |
|
It still errors out if the tables aren't created in the right order. |
|
Ahh, of course... |
I could potentially add What do you think? |
sougou
left a comment
There was a problem hiding this comment.
In that case, this is good to go. I've restarted the failed tests. We can merge once they pass.
fda5de4 to
3d868a0
Compare
|
Looks like the tests need fixing after all. |
|
Oh, I thought a dba query would allow running an arbitrary
|
|
I think these tests use mocks. You'll just have to add that query to the expected list. |
People who don't have foreign keys won't care, and people who do need checks disabled because the logic is not yet clever enough to create the tables in an order which is compatible with their foreign key dependencies Signed-off-by: David Weitzman <dweitzman@pinterest.com>
3d868a0 to
fbd0a63
Compare
|
@dweitzman we should rework this PR into the newer vreplication. Disable FK checks during vrepl and enable it just before accepting writes in |
|
This has been addressed in #6284. Please feel free to re-open if that doesn't cover all situations. |
People who don't have foreign keys won't care, and people who
do have FKs need the checks disabled because the logic is not yet clever enough
to create the tables in an order which is compatible with their
foreign key dependencies