Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions go/vt/vtctl/vtctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ var commands = []commandGroup{
"[-cells=c1,c2,...] [-reverse] -workflow=workflow <target keyspace> <tablet type>",
"Migrate read traffic for the specified workflow."},
{"MigrateWrites", commandMigrateWrites,
"[-filtered_replication_wait_time=30s] -workflow=workflow <target keyspace>",
"[-filtered_replication_wait_time=30s] [-reverse_replication=<true/false>] -workflow=workflow <target keyspace>",
"Migrate write traffic for the specified workflow."},
{"CancelResharding", commandCancelResharding,
"<keyspace/shard>",
Expand Down Expand Up @@ -1919,6 +1919,7 @@ func commandMigrateReads(ctx context.Context, wr *wrangler.Wrangler, subFlags *f

func commandMigrateWrites(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error {
filteredReplicationWaitTime := subFlags.Duration("filtered_replication_wait_time", 30*time.Second, "Specifies the maximum time to wait, in seconds, for filtered replication to catch up on master migrations. The migration will be aborted on timeout.")
reverseReplication := subFlags.Bool("reverse_replication", true, "Also reverse the replication")
workflow := subFlags.String("workflow", "", "Specifies the workflow name")
if err := subFlags.Parse(args); err != nil {
return err
Expand All @@ -1931,7 +1932,7 @@ func commandMigrateWrites(ctx context.Context, wr *wrangler.Wrangler, subFlags *
if *workflow == "" {
return fmt.Errorf("a -workflow=workflow argument is required")
}
journalID, err := wr.MigrateWrites(ctx, keyspace, *workflow, *filteredReplicationWaitTime)
journalID, err := wr.MigrateWrites(ctx, keyspace, *workflow, *filteredReplicationWaitTime, *reverseReplication)
if err != nil {
return err
}
Expand Down
Loading