Skip to content

add enableReloadSchema flag to ExecuteFetchAsDba in tabletmanager#658

Merged
yaoshengzhe merged 1 commit intovitessio:masterfrom
yaoshengzhe:fix_add_reload_schema_flag
May 4, 2015
Merged

add enableReloadSchema flag to ExecuteFetchAsDba in tabletmanager#658
yaoshengzhe merged 1 commit intovitessio:masterfrom
yaoshengzhe:fix_add_reload_schema_flag

Conversation

@yaoshengzhe
Copy link
Copy Markdown
Contributor

reloadSchema is false by default. If it is set to be true, ExecuteFetchAsDba
will reload tablet schema once it finishes successfully. In addition, this change
also make CopySchemaShard trigger schema reload.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could pass in the boolean to applySqlShard, and in the for loop above, change code to:
for i, sqlLine := range createSql {
err = wr.applySqlShard(ctx, tabletInfo, sqlLine, i == len(createSql)-1)
So we only reload schema for the last one?

(if there is an error, we're in trouble anyway, not having reloaded the schema is the last of our worries)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cood catch!

@alainjobart
Copy link
Copy Markdown
Contributor

OK I'll be a pain for the rest of the variables too, they're all named enableReloadSchema, should be just reloadSchema everywhere. Last nit pick, I swear. :)

reloadSchema is false by default. If it is set to be true, ExecuteFetchAsDba
will reload tablet schema once it finishes successfully. In addition, this change
also make CopySchemaShard trigger schema reload.
@yaoshengzhe
Copy link
Copy Markdown
Contributor Author

Done. Rename variable to reloadSchema.

@alainjobart
Copy link
Copy Markdown
Contributor

LGTM

yaoshengzhe added a commit that referenced this pull request May 4, 2015
add enableReloadSchema flag to ExecuteFetchAsDba in tabletmanager
@yaoshengzhe yaoshengzhe merged commit 34d0e6a into vitessio:master May 4, 2015
@yaoshengzhe yaoshengzhe deleted the fix_add_reload_schema_flag branch May 4, 2015 21:31
frouioui added a commit to planetscale/vitess that referenced this pull request Feb 25, 2025
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
maksimov pushed a commit to maksimov/vitess that referenced this pull request Feb 19, 2026
…pting bind variables in time related function calls (vitessio#590)" (vitessio#658)

This reverts commit 3f20a9d.
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