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

Update the schema copy with minimal changes #8067

Merged
merged 4 commits into from
May 11, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented May 7, 2021

Instead of deleting everything and refilling the table on every change, we only remove the rows for the updated tables and fill those in again.

systay added 2 commits May 7, 2021 10:59
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay added Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) labels May 9, 2021
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay marked this pull request as ready for review May 10, 2021 07:33
@systay systay requested a review from shlomi-noach as a code owner May 10, 2021 07:33
return nil
}

tableNamePredicate := fmt.Sprintf("table_name IN (%s)", strings.Join(tableNames, ", "))
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider that in large deployments this query could reach MBs of characters. Perhaps set some threshold? e.g. if len(tableNames) < 100 { // run the IN query } else { // just grab everything }

@systay systay merged commit 5599bc8 into vitessio:master May 11, 2021
@systay systay deleted the schema-fetch branch May 11, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants