vreplication: clean-up copy_state correctly#5048
Merged
sougou merged 2 commits intovitessio:masterfrom Aug 8, 2019
Merged
Conversation
* On delete of a row in _vt.vreplication, we should also cleanup the copy_state table, because it may have related rows. * Made workflow into a flag, but mandatory. Otherwise the number of unnamed arguments are too many and command becomes unreadable. * Added ability to read from _vt.copy_state using VReplicaionExec. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Legacy mode vreplication will not create copy_state. So, we have to ignore the table not found error when deleting from copy_state. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
deepthi
reviewed
Aug 8, 2019
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
The copy_state part looks fine, but I have a question on workflow inline.
| direction = wrangler.DirectionBackward | ||
| } | ||
| return wr.MigrateReads(ctx, keyspace, workflow, servedType, cells, direction) | ||
| if *workflow == "" { |
Collaborator
There was a problem hiding this comment.
How does this affect vtctl SplitClone? should that return an workflow name that can be used for subsequent invocations of MigrateReads and MigrateWrites?
Contributor
Author
There was a problem hiding this comment.
vtctl SplitClone and VerticalSplitClone will also be deprecated. They won't work with MigrateReads and MigrateWrites. The replacement commands are Migrate and Reshard, which you'll see in the POC branch.
deepthi
approved these changes
Aug 8, 2019
deepthi
added a commit
to planetscale/vitess
that referenced
this pull request
Aug 13, 2019
…se needs to be updated to conform to that Signed-off-by: deepthi <deepthi@planetscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the copy_state table, because it may have related rows.
of unnamed arguments are too many and command becomes unreadable.
Signed-off-by: Sugu Sougoumarane ssougou@gmail.com