-
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
Use proper keyspace when updating the query graph of a reference DML #17226
Conversation
Signed-off-by: Florent Poinsard <[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 #17226 +/- ##
==========================================
- Coverage 67.40% 67.39% -0.02%
==========================================
Files 1570 1570
Lines 252903 252934 +31
==========================================
- Hits 170460 170454 -6
- Misses 82443 82480 +37 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
We should add an end-to-end test that asserts that this works well |
Signed-off-by: Florent Poinsard <[email protected]>
Added via 30dae54 |
…17226) Signed-off-by: Florent Poinsard <[email protected]>
…17226) Signed-off-by: Florent Poinsard <[email protected]>
… reference DML (#17226) (#17258) Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Florent Poinsard <[email protected]>
… reference DML (#17226) (#17257) Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Florent Poinsard <[email protected]> Co-authored-by: Florent Poinsard <[email protected]>
…itessio#17226) Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Renan Rangel <[email protected]>
Description
This PR fixes a regression introduced by #15107, when a user is using (
use ks
) a sharded keyspace that has a reference table with its source in an unsharded keyspace, the query planner would not set the target keyspace correctly when rewriting the query graph, leading to the following plan:This plan ultimately leads to a failure in the engine as we cannot execute updates with a
reference
OpCode:vitess/go/vt/vtgate/engine/update.go
Lines 65 to 73 in e3d2e89
This PR makes sure we are setting the target keyspace correctly.
Must be backported to 20 and 21.