Skip to content

vrepl: vtctld Migrate command#5653

Merged
sougou merged 4 commits intovitessio:masterfrom
planetscale:ss-vrepl-migrate
Jan 8, 2020
Merged

vrepl: vtctld Migrate command#5653
sougou merged 4 commits intovitessio:masterfrom
planetscale:ss-vrepl-migrate

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Jan 3, 2020

We reuse the Materialize command to build the command to migrate tables from one keyspace to another. This works from any keyspace to any keyspace, and the MigrateReads and MigrateWrite commands can be used to migrate traffic.

@sougou sougou requested a review from deepthi January 3, 2020 20:53
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for a couple of nits.

"Start a Resharding process. Example: Reshard ks.workflow001 '0' '-80,80-'"},
{"Migrate", commandMigrate,
"[-cell=<cell>] [-tablet_types=<tablet_types>] -workflow=<workflow> <source_keyspace> <target_keyspace> <table_specs>",
`Start a table(s) migration, table_specs is a list of tables or the tables section of the vschema for the target keyspace. Example: '{"t1":{}, "t2":{}}`},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give a more complex example in the help text?

Comment on lines +1824 to +1823
if *workflow == "" {
return fmt.Errorf("a workflow name must be specified")
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would check this first, before checking the args.

CreateDdl: "copy",
})
}
return wr.Materialize(ctx, ms)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for reuse :)

sougou added 4 commits January 7, 2020 16:19
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou merged commit 6d44678 into vitessio:master Jan 8, 2020
@sougou sougou deleted the ss-vrepl-migrate branch January 8, 2020 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants