-
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: Support ignoring the source Keyspace on MoveTables cancel/complete #17729
base: main
Are you sure you want to change the base?
VReplication: Support ignoring the source Keyspace on MoveTables cancel/complete #17729
Conversation
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17729 +/- ##
=======================================
Coverage 67.95% 67.95%
=======================================
Files 1586 1585 -1
Lines 255173 255236 +63
=======================================
+ Hits 173398 173452 +54
- Misses 81775 81784 +9 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
68a4c75
to
6440a91
Compare
Signed-off-by: Matt Lord <[email protected]>
f2855a4
to
667e62b
Compare
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
a0cb377
to
14b0032
Compare
go/vt/vtctl/workflow/server.go
Outdated
if req.RenameTables { | ||
renameTable = RenameTable | ||
|
||
if req.IgnoreSourceKeyspace { |
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.
We should probably pass req.IgnoreSourceKeyspace
into dropSources()
because dropSources()
is doing a few of things that are missed in the path where req.IgnoreSourceKeyspace=true
:
validateWorkflowHasCompleted()
dropTargetDeniedTables()
Also we are locking the keyspace in the path for req.IgnoreSourceKeyspace=false
in dropSources()
and adding dry run results as well.
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.
Good point. This was the first change I made in this work and after having done everything else I completely agree. Initially I was thinking dropSources was only source side and dropTargets was only target side but that proved to be mistaken. I've made this change. Thanks!
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Description
As noted in the issue you may have a
MoveTables
workflow running for a long time with the traffic switched so that all traffic is going to the target keyspace. Then at some point someone may delete/decommission the source keyspace as it's no longer needed — before having completed the workflow. If that happens then there's no way to complete the workflow and a number of manual steps would be needed to cleanup the Topo Server and MySQL data associated with the workflow. This PR adds a--ignore-source-keyspace
flag to theMoveTables complete
command in order to support the cleanup work in this scenario.Manual tests:
Related Issue(s)
--force
flag for MoveTables / Workflow completion #17517Checklist