--- Complete

Tear down a workflow after switching all traffic

This documentation is for a new (v2) set of vtctld commands that start in Vitess 11.0. See RFC for more details.

Command #

MoveTables/Reshard [-keep_data] [-keep_routing_rules] [-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 and blacklisted 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.

-keep_routing_rules #

optional
default false

Usually, any routing rules added in the source keyspace are removed by Complete. If this flag is used the routing rules in the source keyspace will be left in place.

-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

You can do a dry run where no actual action is taken but the command logs all the actions that would be taken by Complete.