-
Notifications
You must be signed in to change notification settings - Fork 2.3k
movetables mirrortraffic: let read-only queries bypass denied tables #18775
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Max Englander <[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
|
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18775 +/- ##
=======================================
Coverage 69.72% 69.72%
=======================================
Files 1607 1607
Lines 214641 214734 +93
=======================================
+ Hits 149651 149722 +71
- Misses 64990 65012 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
Signed-off-by: Max Englander <[email protected]>
mattlord
left a comment
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.
Thanks @maxenglander ! This could definitely make total sense for MirrorTraffic workflows. Can we enforce that this new topo option ONLY be used with that command / workflow type? It defeats the purpose of the denied tables list to a large degree, so I think it's worth being extra cautious and limiting its use as much as possible. This might be what you were thinking in this noted potential alternative Add Mirrored field to tablet Execute RPCs.
When would an operator want this enabled or not for a MirrorTraffic workflow? Should we always enable it for them?
|
Hey @mattlord 👋
I think so! I'll look into that.
I think an operator would always want this anytime they specify |
|
Hey @mattlord,
I thought more about this, and I'm actually not sure what a good way to do this would be.
Currently, the
Just to add to what I said above, the |
Description
Allow mirrored queries to execute against the target of a
MoveTablesworkflow in spite of the presence of denied tables in the tablet control record.Details
Achieve this by adding a new
allow_readsfield to tablet controls as part ofMirrorTrafficcommand. When this field is set, tablets will allowSelect*plans to bypass the query rules built from tablet controls.Alternatives
Some alternatives I considered but decided against. Happy to switch to either of these or another approach if we don't like this PR's direction.
Add
Mirroredfield to tabletExecuteRPCsSet this field when executing mirrored queries. Have VTTablet pass this field down to query rule evaluation, allowing it to bypass denied tables query rule when (1) plan is
Select*and (2)Mirroredis true.This approach seemed about equivalent to what the PR does now.
Unconditionally allow
Select*plan to bypass denied tablesThis would simplify things a lot. The main downside seems pretty small, I think mainly users might be surprised to find that some plans could bypass denied tables, and others could not. But figured I'd at least show that it's easy enough to conditionally allow reads only when traffic mirroring is enabled.
Related Issue(s)
Fixes #18774
Checklist
or are not requiredDeployment Notes
AI Disclosure
AI was not used.