Skip to content
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

resharding: auto-reverse replication #4249

Closed
wants to merge 5 commits into from

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Oct 8, 2018

This PR is on top of the idempotence PR. I'm just creating it to see if the tests pass.
I'll recreate it formally after idempotence is submitted.

MigrateServedTypes has been made idempotent: if it fails in
the middle, you can safely retry the operation. If the operation
has previously succeeded, retrying it will be a no-op (except
for master migration).

For master migration. A new Frozen field has been added to the
tablet control record. This field signifies the point of no
return. If a migrate fails before reaching this state, then
we undo everything and re-enable the source shards. Once we
go past the 'frozen' state, you can only go forward. If there
are failures after the frozen state, the migrate can be safely
retried until successful. Once successful, a retry will return
an error saying that there's no resharding in progress.

The resharding end to end test has been updated to demonstrate
these behaviors.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
MigrateServedTypes for master automatically does the prep work for
reversing replication. If the flag is specified, it reverses the
direction thereby allowing you to migrate back to the original
masters.

If the flag was not originally specified, then it only does the prep
work, without actually starting the replication. You can later
reissue the Migrate command, which will then start the vreplication.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
CancelResharding works for horizontal and vertical resharding
as long as migration hasn't started.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
A convenient command for displaying all resharding related data.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou
Copy link
Contributor Author

sougou commented Oct 17, 2018

This was a trial PR. Closing this. Individual commits will be submitted as separate PRs.

@sougou sougou closed this Oct 17, 2018
notfelineit pushed a commit to planetscale/vitess that referenced this pull request Mar 12, 2024
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
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.

1 participant