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

vtctl ApplySchema: introduce -migration_context flag, synonym to -request_context #9572

Merged

Conversation

shlomi-noach
Copy link
Contributor

Description

Today, vtctl ApplySchema accepts a -request_context flag. We really call it the migration context. In SHOW VITESS_MIGRATIONS ... output it shows as migration_context.

So in this PR, vtctl ApplySchema now supports a -migration_context flag. The two are synonymous so this change is backwards compatible.

Also, we've renamed all variables/fields internally from requestContext to migrationContext and from RequestContext to MigrationContext. Thankfully none of these were in any way exported to JSON or to database by implicit name; we always aliased them properly, so this code change has no effect on existing data, and an upgrade shouldn't break anything.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

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.

Is there a plan to phase out -request_context?

@deepthi deepthi merged commit 33a6a1c into vitessio:main Jan 27, 2022
@deepthi deepthi deleted the apply-schema-migration-context-flag branch January 27, 2022 22:57
@shlomi-noach
Copy link
Contributor Author

Is there a plan to phase out -request_context?

Good question. I didn't make a plan. We can phase it out at leisure, the variable isn't really any burden, just a couple extra lines of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: vtctl Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants