Skip to content

Commit

Permalink
Document changes from vitessio/vitess#12622
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Mar 16, 2023
1 parent 0ba8a7f commit d2bbd30
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
31 changes: 29 additions & 2 deletions content/en/docs/17.0/reference/vreplication/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ weight: 50
### Command

```
Workflow -- [--dry_run] <keyspace.workflow> <action>
Workflow -- [--dry-run] [--cells=<cells>] [--tablet-types=<types>] [--on-ddl=<value>] <keyspace>[.<workflow>] <action>
```

### Description
Expand All @@ -17,19 +18,44 @@ actually specifying a query to VReplication.

### Parameters

#### --dry_run
#### --dry-run
**optional**\
**default** false

<div class="cmd">
You can do a dry run where no actual action is taken but the command logs all the actions that would be taken by the Workflow.
</div>

#### --cells
**optional** (Update only)\
**default** false

<div class="cmd">
You can update an existing workflow so that a different set of cells and/or cell aliases are used when choosing replication sources.
</div>

#### --tablet-types
**optional** (Update only)\

<div class="cmd">
You can update an existing workflow so that different types of tablets are selected when choosing replication sources (see [tablet selection](../tablet_selection/)).
</div>

#### --on-ddl
**optional** (Update only)\

<div class="cmd">
You can update an existing workflow so that DDL in the replication stream are handled differently (see [tablet selection](../vreplication/#handle-ddl)).
</div>

#### keyspace.workflow
**mandatory**

<div class="cmd">
Name of target keyspace and the associated workflow to take action on.
{{< note >}}
The `listall` action is an exception to this rule as with that action you only specify the keyspace.
{{< /note >}}
</div>

#### action
Expand All @@ -40,6 +66,7 @@ The Action is one of:

* **stop**: sets the state of the workflow to Stopped: no further vreplication will happen until workflow is restarted
* **start**: restarts a Stopped workflow
* **update**: updates configuration parameters for this workflow in the `_vt.vreplication` table
* **delete**: removes the entries for this workflow in the `_vt.vreplication` table
* **show**: returns a JSON object with details about the associated shards and also with all the columns
from the `_vt.vreplication` table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ The following vreplication streams exist for workflow customer.commerce2customer

id=1 on 0/zone1-0000000200: Status: Running. VStream has not started.


$ for tablet in $(vtctlclient ListAllTablets -- --keyspace=customer --tablet_type=primary | awk '{print $1}'); do
vtctlclient VReplicationExec -- ${tablet} 'update _vt.vreplication set tablet_types="replica,primary" where workflow="commerce2customer"'
done

$ vtctlclient Workflow -- --tablet-types="replica,primary" customer.commerce2customer update

$ vtctlclient MoveTables -- Progress customer.commerce2customer

Expand Down

0 comments on commit d2bbd30

Please sign in to comment.