Skip to content

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

@shlomi-noach

Description

@shlomi-noach

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions