-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
BR restore failed: error="cannot find rewrite rule: [BR:Restore:ErrRestoreInvalidRewrite]invalid rewrite rule" #35744
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
component/br
This issue is related to BR of TiDB.
severity/major
type/bug
The issue is confirmed as a bug.
Comments
looks like the backup files has some problems. |
This issue is caused by restoring to an existing table and the table lacks an index. Reproduced with following steps # Create a table with an index.
sysbench --db-driver=mysql --mysql-host=127.0.0.1 --mysql-port=4000 --mysql-user=root \
--mysql-db=test --tables=1 --table-size=10 --create_secondary=true \
oltp_update_index prepare
# Backup the table
br backup full ...
# Drop the table and create it again without index.
mysql -h 127.0.0.1 -P 4000 -u root -E -e 'drop table test.sbtest1'
sysbench --db-driver=mysql --mysql-host=127.0.0.1 --mysql-port=4000 --mysql-user=root \
--mysql-db=test --tables=1 --table-size=10 --create_secondary=false \
oltp_update_index prepare
# Restore
br restore full ...
...
[2023/06/15 18:36:13.819 +08:00] [INFO] [collector.go:77] ["Full Restore failed summary"] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0] [split-region=511.73µs] [restore-ranges=4]
Error: cannot find rewrite rule: [BR:Restore:ErrRestoreInvalidRewrite]invalid rewrite rule |
There should be a pre-recovery check to ensure that the target cluster does not already have the table being restored. |
12 tasks
13 tasks
If this PR cherry-pick to release-7.1, please also cherry-pick #57030. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
component/br
This issue is related to BR of TiDB.
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
Error: cannot find rewrite rule: [BR:Restore:ErrRestoreInvalidRewrite]invalid rewrite rule\n", "error": "command terminated with exit code 1"
4. What is your TiDB version? (Required)
["Welcome to Backup & Restore (BR)"] [release-version=v6.1.0-nightly] [git-hash=ce7b541b2d3efd0120f9bec62db3f5088c723482] [git-branch=heads/refs/tags/v6.1.0-nightly] [go-version=go1.18.2] [utc-build-time="2022-06-24 11:01:21"] [race-enabled=false]
The text was updated successfully, but these errors were encountered: