-
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
Fix view tracking on sharded keyspace #15436
Conversation
Signed-off-by: Harshit Gangal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15436 +/- ##
=======================================
Coverage 65.64% 65.64%
=======================================
Files 1562 1563 +1
Lines 194318 194370 +52
=======================================
+ Hits 127553 127589 +36
- Misses 66765 66781 +16 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
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.
rest lgtm
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
Description
When
vtgate
receivesSELECT *
queries and possesses authoritative column information for the tables in the query, it expands*
into the actual column list, simplifying subsequent planning.This column information is sourced from the schema tracker, which experiences a slight delay in reflecting schema changes in
vtgate
. Previously, following anALTER TABLE
that modified the column list, an immediateALTER VIEW
incorporating aSELECT *
ledvtgate
to expand the columns using outdated information from the schema tracker, causing the resultant view to misrepresent the updated schema.The remedy involves refraining from expanding columns in
CREATE/ALTER VIEW
statements, allowing MySQL to handle column expansion. The schema tracker then forwards the view definition tovtgate
, ensuring consistency.However, a temporal lag may persist; if a view is queried immediately post-alteration, it might display the previous definition until
vtgate
receives the updated information. Unlike before, where the view would permanently display an incorrect definition, this issue is now transient.Related Issue(s)
Fixes #15456
Checklist
Deployment Notes