Skip to content
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

Throttler: re-implement 'ALTER VITESS_MIGRATION ... THROTTLE ...' to write to 'topo' #13510

Closed
shlomi-noach opened this issue Jul 16, 2023 · 0 comments · Fixed by #13511
Closed
Assignees
Labels
Component: Throttler Type: Enhancement Logical improvement (somewhere between a bug and feature)

Comments

@shlomi-noach
Copy link
Contributor

Context: #13341

Starting with #13351, we store app-throttling rules in topo. This means vtctldclient UpdateThrottlerConfig now supports per-app throttling configuration, e.g.:

$ vtctldclient UpdateThrottlerConfig --throttle-app="vreplication" --throttle-app-ratio=0.5 --throttle-app-duration="30m" commerce

However, we also already have existing ALTER VITESS_MIGRATION ... (THROTTLE|UNTHROTTLE) ... set of commands. Today, these are sent to the backend tablets just like any other ALTER VITESS_MIGRATION command such as CANCEL, COMPLETE, etc.

As a reminder, ALTER VITESS_MIGRATION ... (THROTTLE|UNTHROTTLE) ... was constructed for a convenient control over schema migrations. . It applies either to a given UUID or to "online-ddl" apps. Examples:

alter vitess_migration '96ace339_23b6_11ee_b8b7_0a43f95f28a3' throttle expire `1h`;
alter vitess_migration '96ace339_23b6_11ee_b8b7_0a43f95f28a3' unthrottle;
alter vitess_migration throttle all;
alter vitess_migration unthrottle all;

The command must now reroute through topo: it must not reach the backend tablets directly. It should apply to Keyspace and SrvKeyspace in topo, on which the tablet throttler listens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Throttler Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant