-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vreplication: Reshard command #5491
Conversation
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>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
There was a problem hiding this 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.
@@ -307,6 +307,9 @@ var commands = []commandGroup{ | |||
{"ValidateKeyspace", commandValidateKeyspace, | |||
"[-ping-tablets] <keyspace name>", | |||
"Validates that all nodes reachable from the specified keyspace are consistent."}, | |||
{"Reshard", commandReshard, | |||
"[-skip_schema_copy] <keyspace.workflow> <source_shards> <target_shards>", | |||
"Start a Resharding process. Example: Reshard ks.workflow001 '0' '-80,80-'"}, | |||
{"SplitClone", commandSplitClone, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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 withMigrateReads
andMigrateWrites
.