-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Schema RPC to fetch table/view definition #12375
Conversation
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment in schema.go needs to be updated
// This file provides a few utility variables and methods, mostly for tests.
// The assumptions made about the types of fields and data returned
// by MySQl are validated in schema_test.go. This way all tests
// can use these variables and methods to simulate a MySQL server
// (using fakesqldb/ package for instance) and still be guaranteed correct
// data.
We are now using those queries in production, not just tests.
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
&vtrpcpb.CallerID{}, | ||
&querypb.VTGateCallerID{Username: "dev"})) | ||
|
||
defer client.Execute(qDelAllRows, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shoudn't we do this after client.Execute
and before the require.NoError
* feat: proto changes to add new rpc Signed-off-by: Harshit Gangal <harshit@planetscale.com> * feat: vttablet changes in queryservice to implement the new rpc Signed-off-by: Harshit Gangal <harshit@planetscale.com> * added test on tabletserver Signed-off-by: Harshit Gangal <harshit@planetscale.com> * feat: use the new schema rpc in vtgate to get updated view definition Signed-off-by: Harshit Gangal <harshit@planetscale.com> * remove error from getschemaresponse and change the enum name Signed-off-by: Harshit Gangal <harshit@planetscale.com> * updated proto files for vtadmin Signed-off-by: Harshit Gangal <harshit@planetscale.com> * fix e2e test Signed-off-by: Harshit Gangal <harshit@planetscale.com> --------- Signed-off-by: Harshit Gangal <harshit@planetscale.com> Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Description
This PR adds a new RPC to the vttablet query service for VTGate to invoke to retrieve the updated view or table definition.
Related Issue(s)
Checklist
Deployment Notes