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

incremental restore doesn't empty query job. #33322

Closed
3pointer opened this issue Mar 22, 2022 · 4 comments · Fixed by #33384
Closed

incremental restore doesn't empty query job. #33322

3pointer opened this issue Mar 22, 2022 · 4 comments · Fixed by #33384
Assignees
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 component/br This issue is related to BR of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@3pointer
Copy link
Contributor

3pointer commented Mar 22, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

It's hard to reproduce it but easy to fix.
because we use ExecuteInternal to Execute DDL job queries during incremental restore.
and sometimes this query might be nil. so the check will not pass.

To Fix it we can ignore the empty job.Query in

err := rc.db.ExecDDL(ctx, job)

2. What did you expect to see? (Required)

incremental restore succeed.

3. What did you see instead (Required)

[2022/03/22 11:04:16.790 +08:00] [ERROR] [restore.go:35] ["failed to restore"] [error="[parser:1064]You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use run multiple statements internally is not supported"]

4. What is your TiDB version? (Required)

master

@3pointer 3pointer added type/bug The issue is confirmed as a bug. affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 labels Mar 22, 2022
@joccau
Copy link
Member

joccau commented Mar 22, 2022

/assign WangLe1321

@ti-chi-bot
Copy link
Member

@joccau: GitHub didn't allow me to assign the following users: WangLe1321.

Note that only pingcap members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign WangLe1321

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@joccau
Copy link
Member

joccau commented Mar 23, 2022

/assign WangLe1321

@WangLe1321
Copy link
Contributor

There is another problem is sql mode of ddl job. For ddl jobs which don't belong to reorg ddl, there is no sql mode information recorded, and we can only set sql mode '' when execute these ddl jobs during restoring, which may result in errors or hidden bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.0 This bug affects 4.0.x versions. affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 component/br This issue is related to BR of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants