-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Online DDL: support 'SHOW VITESS_MIGRATIONS' queries #7638
Online DDL: support 'SHOW VITESS_MIGRATIONS' queries #7638
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Seems like even though we specify |
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
…ess into online-ddl-sql-interface Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Thank you very much to @harshit-gangal and @systay who guided and led me in the right path, and for noticing my Online DDL |
This is now ready to review. This PR only introduced Documentation to follow. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Added one last commit, refactored a couple functions in |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to refactor the file directory as go/test/endtoend/onlineddl/<ghost/vrepl/...>
and place query_util and vtgate_util under go/test/endtoend/onlineddl/
those are the only tests that are using it.
go/vt/sqlparser/ast.go
Outdated
@@ -2480,7 +2480,7 @@ func (node *Show) Format(buf *TrackedBuffer) { | |||
func (node *ShowLegacy) Format(buf *TrackedBuffer) { | |||
nodeType := strings.ToLower(node.Type) | |||
if (nodeType == "tables" || nodeType == "columns" || nodeType == "fields" || nodeType == "index" || nodeType == "keys" || nodeType == "indexes" || | |||
nodeType == "databases" || nodeType == "schemas" || nodeType == "keyspaces" || nodeType == "vitess_keyspaces" || nodeType == "vitess_shards" || nodeType == "vitess_tablets") && node.ShowTablesOpt != nil { | |||
nodeType == "databases" || nodeType == "schemas" || nodeType == "keyspaces" || nodeType == "vitess_keyspaces" || nodeType == "vitess_shards" || nodeType == "vitess_tablets" || nodeType == "vitess_migrations") && node.ShowTablesOpt != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed as show vitess migrations is not legacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@harshit-gangal I have restructured the tests, all nested under go/test/endtoend/onlineddl # base package with shared functionality
go/test/endtoend/onlineddl/vrepl
go/test/endtoend/onlineddl/vrepl_stress
go/test/endtoend/onlineddl/ghost
go/test/endtoend/onlineddl/revert |
Description
Supporting these queries in
vtgate
:SHOW VITESS_MIGRATIONS
- shows all migrations for keyspaceSHOW VITESS_MIGRATIONS LIKE '...'
- shows vitess migrations filtered for UUID, or context, or status. For example:SHOW VITESS_MIGRATIONS LIKE '6df3201f_7fda_11eb_aa27_f875a4d24e90'
- shows a specific migrationSHOW VITESS_MIGRATIONS LIKE 'failed'
- show migrations withfailed
statusSHOW VITESS_MIGRATIONS WHERE ...
- add any custom filter, e.g.:SHOW VITESS_MIGRATIONS WHERE started_timestamp > NOW() - INTERVAL 7 DAY
SHOW VITESS_MIGRATIONS FROM keyspace [LIKE ...|WHERE ...]
- explicitly indicate keyspaceRelated Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: