-
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
VReplication: Support ignoring the source Keyspace on MoveTables cancel/complete #17729
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
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.47% 67.47% -0.01%
==========================================
Files 1594 1594
Lines 258978 259049 +71
==========================================
+ Hits 174746 174785 +39
- Misses 84232 84264 +32 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
68a4c75
to
6440a91
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
f2855a4
to
667e62b
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
a0cb377
to
14b0032
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
And add comment Signed-off-by: Matt Lord <mattalord@gmail.com>
wg := sync.WaitGroup{} | ||
errs := concurrency.AllErrorRecorder{} |
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 like a good candidate for errgroup
, but fine as it is.
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.
Sure, I can switch that over. I had only moved this code in the PR which is why I left it as-is.
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.
Then leave it as it is.
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.
I went ahead and migrated it since I was going to merge in origin/main
anyway and thus do another CI run: 7946667
return err | ||
func (s *Server) dropRelatedArtifacts(ctx context.Context, keepRoutingRules bool, sw iswitcher, opts ...WorkflowActionOption) error { | ||
wopts := processWorkflowActionOptions(opts) | ||
if !wopts.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.
The suggested approach is "don't bother checking the source". I wonder if the approach should be "try the source if possible but fail gracefully"? Just a thought, not sure if that's desired.
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.
I thought about that too but opted for this approach in the end so that we don't end up with undefined behavior and unknown state on the source — that is, some things are cleaned up on some shards (whatever was available and did not error at the time).
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.
That's a good point.
Signed-off-by: Matt Lord <mattalord@gmail.com>
…o_source_ks Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
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
,MoveTables cancel
, andWorkflow delete
commands in order to support the cleanup work in these scenarios.Manual tests:
Related Issue(s)
--force
flag for MoveTables / Workflow completion #17517Checklist