Skip to content

vreplication: Reshard command#5491

Merged
sougou merged 10 commits intovitessio:masterfrom
planetscale:ss-vrepl-reshard
Dec 4, 2019
Merged

vreplication: Reshard command#5491
sougou merged 10 commits intovitessio:masterfrom
planetscale:ss-vrepl-reshard

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Dec 1, 2019

Implement the vtctl Reshard command.

This command replaces all previous SplitClone workflows. After issuing this command and replication has caught up, you can migrate traffic with MigrateReads and MigrateWrites.

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>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
CreateShard starts off all unsharded shards as serving. It
breaks if you create shards -80, 80-, and then 0
(with the intention to reshard to 0).

It was previously allowed because we allowed the old style of custom
sharding where you could create shards 0, 1, 2, etc.
But we don't support that any more.

The new rule sets master as serving only if the keyranges don't
overlap. This is applied for unsharded keyspaces also.

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 requested review from deepthi and rafael December 1, 2019 03:15
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
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 the one question.

{"Reshard", commandReshard,
"[-skip_schema_copy] <keyspace.workflow> <source_shards> <target_shards>",
"Start a Resharding process. Example: Reshard ks.workflow001 '0' '-80,80-'"},
{"SplitClone", commandSplitClone,
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.

are you not removing this command in this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's better not to remove anything legacy right now. I'm thinking we should wait a couple of releases before removing these.

@sougou sougou merged commit 417a207 into vitessio:master Dec 4, 2019
@sougou sougou deleted the ss-vrepl-reshard branch December 4, 2019 02:07
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