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

Bug Report: Altering an unknown table in OnlineDDL hangs migration in queued state without proper error message #14285

Closed
shlomi-noach opened this issue Oct 16, 2023 · 0 comments · Fixed by #14290
Assignees
Labels
Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Type: Bug

Comments

@shlomi-noach
Copy link
Contributor

Overview of the Issue

If you submit an OnlineDDL ALTER TABLE for a table which is either nonexistent, or is not-up-to-date, the migration hangs in migration_status: queued even though it is terminally failed.

Reproduction Steps

Try to ALTER a non-existent table:

$ vtctldclient ApplySchema --ddl-strategy="vitess" --sql "alter table nonexistent engine=innodb" commerce
2d1740eb_6bef_11ee_8738_0a43f95f28a3
> show vitess_migrations like '2d1740eb_6bef_11ee_8738_0a43f95f28a3'\G

*************************** 1. row ***************************
                             id: 2
                 migration_uuid: 2d1740eb_6bef_11ee_8738_0a43f95f28a3
                       keyspace: commerce
                          shard: 0
                   mysql_schema: vt_commerce
                    mysql_table: nonexistent
            migration_statement: alter table nonexistent engine innodb
                       strategy: vitess
                        options:
                added_timestamp: 2023-10-16 06:42:29
            requested_timestamp: 2023-10-16 06:42:29
                ready_timestamp: NULL
              started_timestamp: NULL
             liveness_timestamp: NULL
            completed_timestamp: NULL
              cleanup_timestamp: NULL
               migration_status: queued
...

In the tablet logs:

E1016 06:42:30.303656 3401575 executor.go:3861] Table 'vt_commerce.nonexistent' doesn't exist (errno 1146) (sqlstate 42S02) during query: SHOW CREATE TABLE `nonexistent`
in Executor.getCreateTableStatement()
in Executor.analyzeSpecialAlterPlan(), uuid=2d1740eb_6bef_11ee_8738_0a43f95f28a3, table=nonexistent

Binary Version

18

Operating System and Environment details

-

Log Fragments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant