You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a flag -start_stopped to VReplication Workflows that enables the user to create a workflow in a Stopped state. Right now the workflows start running immediately after creation. So only the vreplication streams will be created but no data will be copied.
There is an existing feature where a workflow can be started such that it only runs the copy phase. If stop_after_copy is set in the source column a workflow will run the copy phase and then stop. It will start the replication phase until that flag has been explicitly removed first before restarting the workflow. To enable this on the cli, a second flag -stop_after_copy has been added, which set this attribute in the workflow configuration.
Use Case(s)
A couple of use-cases for these flags are provided below.
Creating a workflow in the Stopped state
As a Materialize short-cut
For creating custom materialize workflows you can first create the _vt.vreplication rows for them using MoveTables using this flag, then update the required attributes (usually add special Filters for PII purposes or denormalizing some columns) or delete some unwanted tables, before running the workflow. This can often be simpler than generating the required parameters for the Materialize command and/or creating the entries manually using VReplicationExec.
MoveTables flag changes (DDL)
The default behavior, if DDLs are encountered during MoveTables, is to ignore them. If you want them to be applied on the target then you need to use set the on_ddl attribute (https://vitess.io/docs/reference/features/vreplication/#on_ddl)
Stop After Copy phase is completed:
Snapshot for staging/dev environments
If you want to take a "recent" copy of your current data for some reason: say performance testing, reporting etc you can set this attribute and the target keyspace will contain tables that are consistent as of the specified position reached by the stream.
Notes
This will be implemented in both v1 and v2 workflows
While there may not be a use-case at this point we have also implemented the flags for Reshard since it was easy to do
The text was updated successfully, but these errors were encountered:
Feature Description
Add a flag
-start_stopped
to VReplication Workflows that enables the user to create a workflow in a Stopped state. Right now the workflows start running immediately after creation. So only the vreplication streams will be created but no data will be copied.There is an existing feature where a workflow can be started such that it only runs the copy phase. If
stop_after_copy
is set in thesource
column a workflow will run the copy phase and then stop. It will start the replication phase until that flag has been explicitly removed first before restarting the workflow. To enable this on the cli, a second flag-stop_after_copy
has been added, which set this attribute in the workflow configuration.Use Case(s)
A couple of use-cases for these flags are provided below.
Creating a workflow in the Stopped state
As a Materialize short-cut
For creating custom materialize workflows you can first create the
_vt.vreplication
rows for them using MoveTables using this flag, then update the required attributes (usually add special Filters for PII purposes or denormalizing some columns) or delete some unwanted tables, before running the workflow. This can often be simpler than generating the required parameters for the Materialize command and/or creating the entries manually using VReplicationExec.MoveTables flag changes (DDL)
The default behavior, if DDLs are encountered during MoveTables, is to ignore them. If you want them to be applied on the target then you need to use set the
on_ddl
attribute (https://vitess.io/docs/reference/features/vreplication/#on_ddl)Stop After Copy phase is completed:
If you want to take a "recent" copy of your current data for some reason: say performance testing, reporting etc you can set this attribute and the target keyspace will contain tables that are consistent as of the specified position reached by the stream.
Notes
The text was updated successfully, but these errors were encountered: