Add throttler subcommands to branch vtctld#1261
Merged
Merged
Conversation
Add a `throttler` command group under `pscale branch vtctld` for inspecting and configuring the Vitess tablet throttler: pscale branch vtctld throttler status <db> <branch> --tablet-alias ... pscale branch vtctld throttler check <db> <branch> --tablet-alias ... pscale branch vtctld throttler update-config <db> <branch> --keyspace ... --enabled status and check are tablet-scoped; aliases are discoverable via `list-tablets`. update-config is keyspace-scoped and requires --enabled explicitly (there is no "leave unchanged" state). Optional flags such as --threshold and the check flags are only sent when provided, letting the server apply its defaults. Bumps planetscale-go to v0.165.0 for the throttler client methods.
mscoutermarsh
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
throttlercommand group underpscale branch vtctldfor inspecting and configuring the Vitess tablet throttler.Commands
throttler status <db> <branch> --tablet-alias …throttler check <db> <branch> --tablet-alias …throttler update-config <db> <branch> --keyspace … --enabledstatusandcheckare tablet-scoped — tablet aliases are discoverable viapscale branch vtctld list-tablets.update-configis keyspace-scoped.Behavior notes
update-configrequires--enabledexplicitly, since there is no "leave unchanged" state; passing it wrong way would otherwise silently disable the throttler.--threshold,--app-name,--scope,--skip-request-heartbeats,--ok-if-not-exists) are only sent when provided, so the server applies its defaults otherwise.list-keyspaces/list-workflowscommands.Bumps
planetscale-gotov0.165.0for the throttler client methods.Testing
Added tests for each subcommand covering request mapping, required-flag enforcement, and omitted-optional behavior.
go build,go vet,gofmt, andgolangci-lintall pass.