Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Jul 14, 2023
1 parent d58f9eb commit 310528e
Showing 22 changed files with 605 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -102,5 +102,6 @@ vtctldclient [flags]
* [vtctldclient ValidateShard](./vtctldclient_validateshard/) - Validates that all nodes reachable from the specified shard are consistent.
* [vtctldclient ValidateVersionKeyspace](./vtctldclient_validateversionkeyspace/) - Validates that the version on the primary tablet of shard 0 matches all of the other tablets in the keyspace.
* [vtctldclient ValidateVersionShard](./vtctldclient_validateversionshard/) - Validates that the version on the primary matches all of the replicas.
* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.
* [vtctldclient workflow](./vtctldclient_workflow/) - Administer VReplication workflows (Reshard, MoveTables, etc) in the given keyspace

Original file line number Diff line number Diff line change
@@ -23,13 +23,12 @@ For --sql, semi-colons and repeated values may be mixed, for example:
ApplySchema --sql "CREATE TABLE my_table" --sql "CREATE TABLE my_other_table"

```
vtctldclient ApplySchema [--allow-long-unavailability] [--ddl-strategy <strategy>] [--uuid <uuid> ...] [--migration-context <context>] [--wait-replicas-timeout <duration>] [--caller-id <caller_id>] {--sql-file <file> | --sql <sql>} <keyspace>
vtctldclient ApplySchema [--ddl-strategy <strategy>] [--uuid <uuid> ...] [--migration-context <context>] [--wait-replicas-timeout <duration>] [--caller-id <caller_id>] {--sql-file <file> | --sql <sql>} <keyspace>
```

### Options

```
--allow-long-unavailability Allow large schema changes which incur a longer unavailability of the database.
--caller-id string Effective caller ID used for the operation and should map to an ACL name which grants this identity the necessary permissions to perform the operation (this is only necessary when strict table ACLs are used).
--ddl-strategy string Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'gh-ost', 'pt-osc', 'gh-ost --max-load=Threads_running=100'. (default "direct")
-h, --help help for ApplySchema
Original file line number Diff line number Diff line change
@@ -7,15 +7,14 @@ series: vtctldclient
Uses the BackupStorage service on the given tablet to create and store a new backup.

```
vtctldclient Backup [--concurrency <concurrency>] [--allow-primary] [--upgrade_safe] <tablet_alias>
vtctldclient Backup [--concurrency <concurrency>] [--allow-primary] <tablet_alias>
```

### Options

```
--allow-primary Allow the primary of a shard to be used for the backup. WARNING: If using the builtin backup engine, this will shutdown mysqld on the primary and stop writes for the duration of the backup.
--concurrency uint Specifies the number of compression/checksum jobs to run simultaneously. (default 4)
--upgrade_safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades.
-h, --help help for Backup
```

Original file line number Diff line number Diff line change
@@ -13,15 +13,14 @@ Finds the most up-to-date REPLICA, RDONLY, or SPARE tablet in the given shard an
If no replica-type tablet can be found, the backup can be taken on the primary if --allow-primary is specified.

```
vtctldclient BackupShard [--concurrency <concurrency>] [--allow-primary] [--upgrade_safe] <keyspace/shard>
vtctldclient BackupShard [--concurrency <concurrency>] [--allow-primary] <keyspace/shard>
```

### Options

```
--allow-primary Allow the primary of a shard to be used for the backup. WARNING: If using the builtin backup engine, this will shutdown mysqld on the primary and stop writes for the duration of the backup.
--concurrency uint Specifies the number of compression/checksum jobs to run simultaneously. (default 4)
--upgrade_safe Whether to use innodb_fast_shutdown=0 for the backup so it is safe to use for MySQL upgrades.
-h, --help help for BackupShard
```

Original file line number Diff line number Diff line change
@@ -13,16 +13,16 @@ vtctldclient UpdateThrottlerConfig [--enable|--disable] [--threshold=<float64>]
### Options

```
--check-as-check-self /throttler/check requests behave as is /throttler/check-self was called
--check-as-check-shard use standard behavior for /throttler/check requests
--custom-query string custom throttler check query
--disable Disable the throttler
--enable Enable the throttler
-h, --help help for UpdateThrottlerConfig
--threshold float threshold for the either default check (replication lag seconds) or custom check
--throttle-app string set a specific throttling rule for the given app
--throttle-app-ratio float set a throttling ratio for app indicated by --throttle-app. 0 means not throttled, 1.0 means fully throttled.
--throttle-app-duration duration time limit after which throttling rule expires. Set as 0 to cancel an existing rule
--check-as-check-self /throttler/check requests behave as is /throttler/check-self was called
--check-as-check-shard use standard behavior for /throttler/check requests
--custom-query string custom throttler check query
--disable Disable the throttler
--enable Enable the throttler
-h, --help help for UpdateThrottlerConfig
--threshold float threshold for the either default check (replication lag seconds) or custom check
--throttle-app string an app name to throttle
--throttle-app-duration duration duration after which throttled app rule expires (app specififed in --throttled-app) (default 1h0m0s)
--throttle-app-ratio float ratio to throttle app (app specififed in --throttled-app) (default 1)
```

### Options inherited from parent commands
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: movetables
series: vtctldclient
---
## vtctldclient movetables

Perform commands related to moving tables from a source keyspace to a target keyspace.

### Synopsis

MoveTables commands: Create, Show, Status, SwitchTraffic, ReverseTraffic, Stop, Start, Cancel, and Delete.
See the --help output for each command for more details.

### Options

```
--format string The format of the output; supported formats are: text,json (default "text")
-h, --help help for movetables
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
-w, --workflow string The workflow you want to perform the command on (required)
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
```

### SEE ALSO

* [vtctldclient](../) - Executes a cluster management command on the remote vtctld server.
* [vtctldclient movetables cancel](./vtctldclient_movetables_cancel/) - Cancel a MoveTables VReplication workflow
* [vtctldclient movetables complete](./vtctldclient_movetables_complete/) - Complete a MoveTables VReplication workflow
* [vtctldclient movetables create](./vtctldclient_movetables_create/) - Create and optionally run a MoveTables VReplication workflow
* [vtctldclient movetables reversetraffic](./vtctldclient_movetables_reversetraffic/) - Reverse traffic for a MoveTables VReplication workflow
* [vtctldclient movetables show](./vtctldclient_movetables_show/) - Show the details for a MoveTables VReplication workflow
* [vtctldclient movetables start](./vtctldclient_movetables_start/) - Start the MoveTables workflow
* [vtctldclient movetables status](./vtctldclient_movetables_status/) - Show the current status for a MoveTables VReplication workflow
* [vtctldclient movetables stop](./vtctldclient_movetables_stop/) - Stop a MoveTables workflow
* [vtctldclient movetables switchtraffic](./vtctldclient_movetables_switchtraffic/) - Switch traffic for a MoveTables VReplication workflow

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: movetables_cancel
series: vtctldclient
---
## vtctldclient movetables cancel

Cancel a MoveTables VReplication workflow

```
vtctldclient movetables cancel
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" cancel
```

### Options

```
-h, --help help for cancel
--keep-data Keep the partially copied table data from the MoveTables workflow in the target keyspace
--keep-routing-rules Keep the routing rules created for the MoveTables workflow
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: movetables_complete
series: vtctldclient
---
## vtctldclient movetables complete

Complete a MoveTables VReplication workflow

```
vtctldclient movetables complete
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" complete
```

### Options

```
--dry-run Print the actions that would be taken and report any known errors that would have occurred
-h, --help help for complete
--keep-data Keep the original source table data that was copied by the MoveTables workflow
--keep-routing-rules Keep the routing rules in place that direct table traffic from the source keyspace to the target keyspace of the MoveTables workflow
--rename-tables Keep the original source table data that was copied by the MoveTables workflow, but rename each table to '_<tablename>_old'
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: movetables_create
series: vtctldclient
---
## vtctldclient movetables create

Create and optionally run a MoveTables VReplication workflow

```
vtctldclient movetables create
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" create --source-keyspace "commerce" --cells "zone1" --cells "zone2" --tablet-types "replica"
```

### Options

```
--all-tables Copy all tables from the source
--auto-start Start the MoveTables workflow after creating it (default true)
-c, --cells strings Cells and/or CellAliases to copy table data from
--exclude-tables strings Source tables to exclude from copying
-h, --help help for create
--on-ddl string What to do when DDL is encountered in the VReplication stream. Possible values are IGNORE, STOP, EXEC, and EXEC_IGNORE (default "IGNORE")
--source-keyspace string Keyspace where the tables are being moved from (required)
--source-shards strings Source shards to copy data from when performing a partial MoveTables (experimental)
--stop-after-copy Stop the MoveTables workflow after it's finished copying the existing rows and before it starts replicating changes
--tables strings Source tables to copy
--tablet-types strings Source tablet types to replicate table data from (e.g. PRIMARY,REPLICA,RDONLY)
--tablet-types-in-preference-order When performing source tablet selection, look for candidates in the type order as they are listed in the tablet-types flag (default true)
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: movetables_reversetraffic
series: vtctldclient
---
## vtctldclient movetables reversetraffic

Reverse traffic for a MoveTables VReplication workflow

```
vtctldclient movetables reversetraffic
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" reversetraffic
```

### Options

```
-c, --cells strings Cells and/or CellAliases to switch traffic in
--dry-run Print the actions that would be taken and report any known errors that would have occurred
--enable-reverse-replication Setup replication going back to the original source keyspace to support rolling back the traffic cutover (default true)
-h, --help help for reversetraffic
--max-replication-lag-allowed duration Allow traffic to be switched only if VReplication lag is below this (default 30s)
--tablet-types strings Tablet types to switch traffic for
--timeout duration Specifies the maximum time to wait, in seconds, for VReplication to catch up on primary tablets. The traffic switch will be cancelled on timeout. (default 30s)
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: movetables_show
series: vtctldclient
---
## vtctldclient movetables show

Show the details for a MoveTables VReplication workflow

```
vtctldclient movetables show
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" show
```

### Options

```
-h, --help help for show
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: movetables_start
series: vtctldclient
---
## vtctldclient movetables start

Start the MoveTables workflow

```
vtctldclient movetables start
```

### Examples

```
vtctldclient --server=localhost:15999 MoveTables --workflow "commerce2customer" --target-keyspace "customer" start
```

### Options

```
-h, --help help for start
```

### Options inherited from parent commands

```
--action_timeout duration timeout for the total command (default 1h0m0s)
--server string server to use for connection (required)
--target-keyspace string Keyspace where the tables are being moved to and where the workflow exists (required)
```

### SEE ALSO

* [vtctldclient movetables](./vtctldclient_movetables/) - Perform commands related to moving tables from a source keyspace to a target keyspace.

Loading

0 comments on commit 310528e

Please sign in to comment.