Skip to content
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

migrater: handle tables based on the vschema info #5315

Merged
merged 3 commits into from
Oct 19, 2019

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Oct 16, 2019

The previous method of identifying reference tables was not completely reliable: it used the absence of a keyrange constraint in the filtering rules. However, this may not be the case if a target keyspace is being converted from unsharded to sharded.

The new way to identify reference tables is by looking at the vschema. This is a more unambiguous way of identifying such tables.

@sougou sougou requested a review from deepthi October 16, 2019 22:54
Copy link
Member

@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.

LGTM

Exprs: sqlparser.SelectExprs{
&sqlparser.AliasedExpr{Expr: &sqlparser.ColName{Name: vtable.ColumnVindexes[0].Columns[0]}},
&sqlparser.AliasedExpr{Expr: sqlparser.NewStrVal([]byte(vtable.ColumnVindexes[0].Type))},
&sqlparser.AliasedExpr{Expr: sqlparser.NewStrVal([]byte("{{.}}"))},
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some comments about the use of {{.}}?

@sougou sougou merged commit 590a06f into vitessio:master Oct 19, 2019
@sougou sougou deleted the ss-vrepl-handle-ref branch October 19, 2019 21:05
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