Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How do differentiate foreignKeyMode=managed and foreignKeyMode=unmanaged _functionally_? How are they actually different? #14660

Closed
janpio opened this issue Dec 2, 2023 · 4 comments

Comments

@janpio
Copy link

janpio commented Dec 2, 2023

Question

Hey, via #14495 (comment) I know that I can run SHOW VSCHEMA KEYSPACES to get a list of all the foreign key mode settings for all existing vschemas. Is there also a way to functionally differentiate the two modes that I could run in a test on the specific database/keyspace? Are the modes somehow different in a way that I can really confirm that the database I am talking to currently runs which mode?

This would be useful for tests that need to know and confirm which mode they are running against (as a simple CREATE DATABASE currently creates a database/keyspace with foreignKeyMode=unmanaged by default.

@GuptaManan100
Copy link
Member

Well from the user stand-point of an app connected to Vitess, the two modes should functionally be the same. There should be no difference in the query results that they receive. The only difference is how the binlogs for MySQL would look like and how all the other features of Vitess using Vreplication will work in the managed mode that otherwsie wouldn't for the unmanaged mode.

@GuptaManan100
Copy link
Member

As you said, Show vschema keyspaces is already a way for an application to tell what mode a certain keyspace is running in. I am not sure what more you are looking for to differentiate the two modes.

@janpio
Copy link
Author

janpio commented Dec 4, 2023

Ok, if they indeed should be functionally identical, then we can just run our tests in both modes and look for differences (and also compare to a similar run for MySQL).

@GuptaManan100
Copy link
Member

Yes, that is correct. We adopt a similar testing approach in Vitess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants