Merged
Conversation
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
deepthi
approved these changes
Jan 3, 2020
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
Looks good except for 1 typo.
go/vt/vtctl/vtctl.go
Outdated
| "[-skip_schema_copy] <keyspace.workflow> <source_shards> <target_shards>", | ||
| "Start a Resharding process. Example: Reshard ks.workflow001 '0' '-80,80-'"}, | ||
| {"Materialize", commandMaterialize, | ||
| `<json_spe>, example : '{"workflow": "aaa", "source_keyspace": "source", "target_keyspace": "target", "table_settings": [{"target_table": "customer", "source_expression": "select * from customer", "create_ddl": "copy"}]}'`, |
Collaborator
There was a problem hiding this comment.
typo: json_spe -> json_spec
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.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.
This is the core Materialize command which will be used to build other workflows.
The core logic is in materialize.go. The input for the command is a protobuf based JSON. Unfortunately, it's still not sufficiently user-friendly, but the flexibility was needed to accommodate all possible scenarios. However, it's still much easier than creating direct vreplication commands.
In the POC branch the Materialize command created the target vschema table based on a complicated command line input. This was not flexible enough. In the new approach, the user must create the vschema for the target table using the regular ApplyVSchema. The Materialize command will then use that info as metadata to generate the right rules.