Skip to content

vrepl: Materialize command#5628

Merged
sougou merged 6 commits intovitessio:masterfrom
planetscale:ss-vrepl-materialize
Jan 3, 2020
Merged

vrepl: Materialize command#5628
sougou merged 6 commits intovitessio:masterfrom
planetscale:ss-vrepl-materialize

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Dec 31, 2019

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.

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>
@sougou sougou requested a review from deepthi December 31, 2019 05:36
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for 1 typo.

"[-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"}]}'`,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: json_spe -> json_spec

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou merged commit 434a684 into vitessio:master Jan 3, 2020
@sougou sougou deleted the ss-vrepl-materialize branch January 3, 2020 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants