-
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
vtgate
: support filtering tablets by tablet-tags
#15911
vtgate
: support filtering tablets by tablet-tags
#15911
Conversation
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[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
|
vtgate
: support filtering tablets by tablet-tags
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15911 +/- ##
==========================================
- Coverage 68.40% 68.22% -0.19%
==========================================
Files 1556 1541 -15
Lines 195121 197254 +2133
==========================================
+ Hits 133479 134570 +1091
- Misses 61642 62684 +1042 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[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.
In general I tend to be thrifty about adding new flags, but this seems like a logical extension of the tags feature of the tablet (which already exists for whatever reason), so I'm not objecting to this.
The implementation and unit tests look fine. I'll leave it to you to investigate and fix the unit tests.
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.
Left a comment on something i am not sure about. Otherwise, besides the failing tests LGTM.
We should probably do a single website PR that gathers the new flags introduced by this PR and #15919.
} | ||
topoWatchers = append(topoWatchers, NewTopologyWatcher(ctx, topoServer, hc, filter, c, refreshInterval, refreshKnownTablets, topo.DefaultConcurrency)) | ||
topoWatchers = append(topoWatchers, NewTopologyWatcher(ctx, topoServer, hc, filters, c, refreshInterval, refreshKnownTablets, topo.DefaultConcurrency)) |
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.
Shouldn't we reset the filters
slice here? Otherwise we keep appending the same filters over and over again for each cells.
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.
@frouioui good catch! yes, this should be a reset each iteration of the loop, updated 👍
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.
@frouioui re-requested review on the fix 🙇
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
Reminder for a website PR. |
Co-authored-by: Shlomi Noach <[email protected]> Signed-off-by: Tim Vaillancourt <[email protected]>
Will merge this PR without website changes, so as to get this into v20 before code freeze. Ideally the website PR will follow before RC1 next week. |
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]> Co-authored-by: Shlomi Noach <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
* `vtgate`: support filtering tablets by tablet-tags (vitessio#15911) Signed-off-by: Tim Vaillancourt <[email protected]> Co-authored-by: Shlomi Noach <[email protected]> * Add support for sampling rate in `streamlog` (vitessio#15919) Signed-off-by: Tim Vaillancourt <[email protected]> * Fix merge conflict resolution Signed-off-by: Tim Vaillancourt <[email protected]> * update rand import Signed-off-by: Tim Vaillancourt <[email protected]> * Add sql text counts stats to `vtcombo`,`vtgate`+`vttablet` (vitessio#15897) Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]> * missing rename Signed-off-by: Tim Vaillancourt <[email protected]> * missing rename again Signed-off-by: Tim Vaillancourt <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Shlomi Noach <[email protected]> Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]> Co-authored-by: Shlomi Noach <[email protected]>
* `vtgate`: support filtering tablets by tablet-tags (vitessio#15911) Signed-off-by: Tim Vaillancourt <[email protected]> Co-authored-by: Shlomi Noach <[email protected]> * Add support for sampling rate in `streamlog` (vitessio#15919) Signed-off-by: Tim Vaillancourt <[email protected]> * Add sql text counts stats to `vtcombo`,`vtgate`+`vttablet` (vitessio#15897) Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Harshit Gangal <[email protected]> Co-authored-by: Shlomi Noach <[email protected]> Co-authored-by: Harshit Gangal <[email protected]> Co-authored-by: Deepthi Sigireddi <[email protected]>
Description
This PR implements the RFC: #15908 by:
vtgate
flag:--tablet-filter-tags StringMap
for a list of tablet-tag KVs to matchThis support works in addition (a secondary filter) to the mutually-exclusive
--tablet_filter
/--keyspaces_to_watch
featuresIf/when there is agreement on the approach I will add documentation for the new support and flag
Related Issue(s)
Resolves #15908
Checklist
Deployment Notes