-
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
Add no_scatter
flag to vttestserver
#15670
Add no_scatter
flag to vttestserver
#15670
Conversation
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: Armand Parajon <[email protected]>
9b3b398
to
4ac36dc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15670 +/- ##
==========================================
- Coverage 68.13% 68.12% -0.02%
==========================================
Files 1556 1556
Lines 195028 195029 +1
==========================================
- Hits 132888 132856 -32
- Misses 62140 62173 +33 ☔ View full report in Codecov by Sentry. |
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.
LGTM. Thank you for the contribution @aparajon ! ❤️
@@ -224,6 +224,8 @@ func New() (cmd *cobra.Command) { | |||
cmd.Flags().DurationVar(&config.VtgateTabletRefreshInterval, "tablet_refresh_interval", 10*time.Second, "Interval at which vtgate refreshes tablet information from topology server.") | |||
|
|||
cmd.Flags().BoolVar(&doCreateTCPUser, "initialize-with-vt-dba-tcp", false, "If this flag is enabled, MySQL will be initialized with an additional user named vt_dba_tcp, who will have access via TCP/IP connection.") | |||
|
|||
cmd.Flags().BoolVar(&config.NoScatter, "no_scatter", false, "when set to true, the planner will fail instead of producing a plan that includes scatter queries") |
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.
We are supposed to use dashes instead of underscores for new flags but this isn't really a new flag but rather we're adding it to another binary and having uniformity is better/nicer for it IMO. So I think this is fine. 🙂
Just noting that IMO it's OK that there's no issue here since this is only testing/vttestserver related. That being said, it would be ideal if you could create a real quick issue about why this is helpful (largely cut and paste from the description) and then add "Fixes " in the description @aparajon 🙏 We try to do this for virtually all PRs so that it's easier to find in the changelogs, feature searches, etc. Thanks again! |
Thanks for the review @mattlord! Created and linked an issue |
Description
This PR adds the flag
no_scatter
tovttestserver
, which will cause scatter queries to automatically fail when set. This behavior is useful for detecting / preventing scatter queries early in a test environment.Note that this flag already exists in vtcombo.
Related Issue(s)
Fixes #15683
Checklist
Deployment Notes