--- Complete
Tear down a workflow after switching all traffic
Command #
MoveTables/Reshard [-keep_data] [-rename_tables] [-dry_run]
Complete <targetKs.workflow>
Description #
Alert: This is a destructive command
Complete
is used after all traffic has been switched. It removes vreplication-related artifacts like rows from vreplication and copy_state tables in the side-car _vt
database and routing rules and denied tables (for MoveTables) from the topo. By default, the source tables (or source shards) are also dropped.
Parameters #
-keep_data #
optional
default false
Usually, the source data (tables or shards) are deleted by Complete. If this flag is used, for MoveTables, source tables will not be deleted, for Reshard, source shards will not be dropped.
-rename_tables #
optional
default false
The rename_tables flag is applicable only for MoveTables. Tables are renamed instead of being deleted. Currently the new name is _<table_name>_old.
We use the same renaming logic used by pt-online-schema-change
. Such tables are automatically skipped by vreplication if they exist on the source.
-dry-run #
optional
default false