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: cannot restore index created during log backup if it is longer than 3072 #58430

Open
YuJuncen opened this issue Dec 20, 2024 · 0 comments · May be fixed by #58433
Open

PiTR: cannot restore index created during log backup if it is longer than 3072 #58430

YuJuncen opened this issue Dec 20, 2024 · 0 comments · May be fixed by #58433
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.

Comments

@YuJuncen
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Start a cluster with:

tiup playground nightly --tiflash=0 --db.config=./op/adhoc/index-length-8001.toml

Where the config index-length-8001.toml is:

max-index-length = 8001

Do the following:

mycli --port 4000 --execute "DROP TABLE IF EXISTS test.huge_idx;"
mycli --port 4000 --execute "CREATE TABLE test.huge_idx(id int AUTO_INCREMENT, blob1 varchar(1000), blob2 varchar(1000))"

$br backup full -s (s3path "$strg_prefix-full") $argv
set backupts (mcli cat "loc/breeze/$strg_prefix-full/backupmeta" | _get_brpb BackupMeta | rg -r '$1' 'end_version: (\d+)$')
$br log start -s (s3path "$strg_prefix-incr") --task-name test $argv --start-ts "$backupts"

mycli --port 4000 --execute "CREATE INDEX huge ON test.huge_idx(blob1, blob2);"

# Wait until the checkpoint advances...
$br restore point -s (s3path huge_index-incr) --full-backup-storage (s3path huge_index-full)

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

Restore should success.

3. What did you see instead (Required)

repair ingest index huge for table test.huge_idx  ABORTED
["restore log failed summary"] [error="failed to repair ingest index: [ddl:1071]Specified key was too long (4000 bytes); max key length is 3072 bytes"]

4. What is your TiDB version? (Required)

nightly

@YuJuncen YuJuncen added the type/bug The issue is confirmed as a bug. label Dec 20, 2024
@YuJuncen YuJuncen linked a pull request Dec 20, 2024 that will close this issue
13 tasks
@YuJuncen YuJuncen added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant