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

pitr restore fail for "failed to insert rows into gc_delete_range: [parser:1064]" #49346

Closed
seiya-annie opened this issue Dec 11, 2023 · 1 comment · Fixed by #49360
Closed
Labels
component/br This issue is related to BR of TiDB. found/automation Found by automation tests severity/major type/bug This issue is a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Start log backup
  2. Do full backup
  3. run sysbench workload
  4. execute flashback ddl before step 3
  5. pause log backup during flashback
  6. resume log backup
  7. Sleep sometime, and wait checkpoint move forward
  8. Do a PiTR restore, and check data consistency (restored-ts = ts1)

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

pitr restore success

3. What did you see instead (Required)

fail

[2023/12/11 09:12:15.863 +00:00] [ERROR] [restore.go:64] ["failed to restore"] [error="failed to insert rows into gc_delete_range: [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 line 1 column 48 near \"\" "] [errorVerbose="[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 line 1 column 48 near \"\" \ngithub.phpd.cn/pingcap/errors.AddStack\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174\ngithub.phpd.cn/pingcap/errors.(*Error).GenWithStackByArgs\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/normalize.go:164\ngithub.phpd.cn/pingcap/tidb/pkg/util.SyntaxError\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/pkg/util/misc.go:159\ngithub.phpd.cn/pingcap/tidb/pkg/session.(*session).ParseWithParams\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/pkg/session/session.go:1705\ngithub.phpd.cn/pingcap/tidb/pkg/session.(*session).ExecuteInternal\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/pkg/session/session.go:1594\ngithub.phpd.cn/pingcap/tidb/br/pkg/gluetidb.(*tidbSession).ExecuteInternal\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/gluetidb/glue.go:181\ngithub.phpd.cn/pingcap/tidb/br/pkg/restore.(*Client).InsertGCRows\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/restore/client.go:3484\ngithub.phpd.cn/pingcap/tidb/br/pkg/task.restoreStream\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/stream.go:1414\ngithub.phpd.cn/pingcap/tidb/br/pkg/task.RunStreamRestore\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/stream.go:1179\ngithub.phpd.cn/pingcap/tidb/br/pkg/task.RunRestore\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/restore.go:621\nmain.runRestoreCommand\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/restore.go:63\nmain.newStreamRestoreCommand.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/restore.go:237\ngithub.phpd.cn/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.phpd.cn/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.phpd.cn/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650\nfailed to insert rows into gc_delete_range"] [stack="main.runRestoreCommand\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/restore.go:64\nmain.newStreamRestoreCommand.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/restore.go:237\ngithub.phpd.cn/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.phpd.cn/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.phpd.cn/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"]

4. What is your TiDB version? (Required)

master

@seiya-annie seiya-annie added the type/bug This issue is a bug. label Dec 11, 2023
@seiya-annie
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. found/automation Found by automation tests severity/major type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants