-
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
RFC: VTGate and Tablet Picker: prefer local cells in source tablet selection for vreplication workflows and the VStream API #11999
Comments
rohit-nayak-ps
added
Type: Feature Request
Needs Triage
This issue needs to be correctly labelled and triaged
labels
Dec 20, 2022
mattlord
added
Component: VReplication
and removed
Needs Triage
This issue needs to be correctly labelled and triaged
labels
Dec 20, 2022
Based on what we've discussed, I think it makes sense to combine into what you mentioned, an
For the docs, we'd just be explicit that the one option is what the default behavior is server side and if they want to opt out, they should pass in |
This was referenced Dec 21, 2022
rohit-nayak-ps
changed the title
(WIP) RFC:: VTGate and Tablet Picker: prefer local cells in source tablet selection for vreplication workflows and the VStream API
RFC:: VTGate and Tablet Picker: prefer local cells in source tablet selection for vreplication workflows and the VStream API
Jan 19, 2023
3 tasks
mattlord
changed the title
RFC:: VTGate and Tablet Picker: prefer local cells in source tablet selection for vreplication workflows and the VStream API
RFC: VTGate and Tablet Picker: prefer local cells in source tablet selection for vreplication workflows and the VStream API
Feb 9, 2023
fixed via #12282 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Description
Description
We propose updating the tablet picker (code) logic to make it easier to choose tablets that are local to the cell or availability zone of the tablet picker's caller/user.
This would include an enhancement the vtgate VStream API (WiP docs here) to support enabling/disabling this new behavior along with new
vtctl
client flags to enable/disable this new behavior for client commands such asMoveTables
.Related issues
#11770
#11771
#11579
Use Cases
There are users who have multiple cells in the same failure domain (e.g. Availability Zone), all of which share a common cell alias. If the alias is passed to the picker it will expand it into all cells which are part of the alias, resulting in a similar issue as Removing mercurial references. #1. It will be useful if the picker can be told to fallback to the other cells in an alias if no local tablets are found.
In addition, the VStream API only takes a single tablet type for the selection of a source today.
We currently have an
"in_order"
hint today that can be specified as a prefix of the string of tablet types passed into the picker. We can deprecate that in favor of explicitly defining the strategy.Proposed Changes
The main issue is that the picker doesn't know the default cell of the caller today (vtgate, vttablet, or vtctld). We propose updating the tablet picker api to allow that to be specified.
As part of that, specific strategy options will be explicitly defined for both tablet types and cells.
Tablet type preference (specified using the
in_order:
clause today) will be given precedence over the local cell. That is, if a tablet type preference is specified with a value of REPLICA then we will always choose a REPLICA tablet whenever one is available, irrespective of the cell (the local cell is only the first choice). Without an explicit tablet type preference specified the cell strategy takes precedence and we will first choose the cells based on their specified priority and look for any appropriate tablet types within it, and if none exist fallback to lower priority cells.Cell selection options:
PreferLocal
: prefer local cell, then specified cellsPreferLocalWithAlias
: prefer local cell, then cell alias of local cell, then specified cellsOnlySpecified
: prefer specified cells, no fallbackOne question here is: can we combine the first two? If the local cell has an alias and we don't find tablets in it, we fallback on the alias. Seems to make sense, since specifying an alias itself means that the user has organized the cells in a particular fashion.
Tablet selection options:
Any
: all provided types are equalInOrder
: provided tablet types expected to be in order or priorityNo new flags will be specified at the vttablet or vtgate level.
Code Changes
The following parts of the code will need to be modified for the refactor:
The following user-facing changes will happen:
Breaking Changes
PreferLocalWithAlias
strategy as the default then, at least for the current use case from tablet picker cell alias fallback with local cell preference #11771, no changes should needed.The text was updated successfully, but these errors were encountered: