Conversation
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>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
fb7c442 to
f31ff17
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
f31ff17 to
0763cf1
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
0735046 to
d7543f1
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
d7543f1 to
28c1c84
Compare
Next step is to try and remove wrangler.TrafficSwitcher and have the wrangler use the workflow implementation if possible. Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
dfd2782 to
89b6b1f
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>
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>
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>
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>
| }) | ||
| } | ||
|
|
||
| func Materialize(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, ms *vtctldatapb.MaterializeSettings) error { |
There was a problem hiding this comment.
We are not using this method now as part of this PR, right? And the related functions that use VReplicationExec etc? We will need to write updated functions for Materialize when we port over that method, right?
There was a problem hiding this comment.
Correct. I moved it over with the other materializer functions -- many of which are used for various other workflow types. MoveTables uses most of them.
Yes, I do think we'll want to update the Materialize specific functions when we migrate that command.
| } | ||
|
|
||
| /* | ||
| func TestMoveTablesV2(t *testing.T) { |
There was a problem hiding this comment.
Do we still need to port these commented tests?
There was a problem hiding this comment.
I had left them in as a reminder for myself. I think that we have the main ones covered now and I added a ticket to the tracking issue to do a final pass to make sure we have good/equivalent coverage for things: #12152
There was a problem hiding this comment.
I'll remove those commented tests from the file for now.
| var dryRunResults *[]string | ||
|
|
||
| if state.WorkflowType == TypeMigrate { | ||
| dryRunResults, err = s.finalizeMigrateWorkflow(ctx, req.TargetKeyspace, req.Workflow, strings.Join(ts.tables, ","), |
There was a problem hiding this comment.
The Migrate command is not yet ported over to vtctld, right? This code path will be exercised once we do that?
There was a problem hiding this comment.
Correct. I started by copying existing wrangler code and then modifying it -- so I didn't see any point in removing this type of code as I expected that we'll be using it again shortly as we migrate the other commands over.
rohit-nayak-ps
left a comment
There was a problem hiding this comment.
Great work on this.
A huge step towards deprecating vtctlclient! ❤️
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
ajm188
left a comment
There was a problem hiding this comment.
looking awesome!! everything i have is non-blocking, either because we'll ignore it (😂) or because it's minor changes
| MoveTablesShow = &cobra.Command{ | ||
| Use: "show", | ||
| Short: "Show the details for a MoveTables VReplication workflow.", | ||
| Example: `vtctldclient --server localhost:15999 movetables --workflow commerce2customer --target-keyspace customer show`, |
There was a problem hiding this comment.
these examples are still using the lowercase version of MoveTables
also ... is it going to be strange the parent command is BigCamelCase while the subcommand is alllowercase?
There was a problem hiding this comment.
(i see they have aliases to their lowercase versions, but now my second question is "is it weird that the parent command is uppercase with alias to lowercase while the child is lowercase with alias to upper?")
There was a problem hiding this comment.
I was using lowercase for the new commands but then when building the docs realized that ALL of the existing commands started with an uppercase letter. Otherwise I would have stuck with everything being lowercase. I thought that the current mix made it uniform while also supporting / showing all lowercase.
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Description
This work migrates the
vtctlMoveTables client command tovtctldclient. In the process we also do some refactoring to eliminate at least some of the generation of SQL statements in vtctld which are sent to vttablets using theVReplicationExectabletmanager RPC and instead call purpose-built tabletmanager RPCs so that the tablet controls the implementation and we eliminate upgrade/downgrade issues.This PR also moves the
MoveTablesrelated steps in the local examples tovtctldclient. Finally, it also moves allMoveTablesrelated steps in the endtoend tests to usevtctldclientexcept for thevreplication_v2workflow (we will have thevtctlclientimplementation around still for quite some time and need to test that as well).Example Output
Related Issue(s)
Checklist