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

【BR】Backing up tables with global indexes will miss the global indexes, resulting in inconsistent checksum #57469

Closed
shaoxiqian opened this issue Nov 18, 2024 · 1 comment · Fixed by #57493
Assignees
Labels
affects-8.3 affects-8.4 affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@shaoxiqian
Copy link
Contributor

shaoxiqian commented Nov 18, 2024

Bug Report

Backing up tables with global indexes will miss the global indexes, resulting in inconsistent checksum.

[2024/11/18 17:10:01.936 +08:00] [WARN] [backup.go:311] ["setting `--ratelimit` and `--concurrency` at the same time, ignoring `--concurrency`: `--ratelimit` forces sequential (i.e. concurrency = 1) backup"] [ratelimit=268.4MB/s] [concurrency-specified=4]
Database Backup <----------------------------------------------------------------------------------------------------------------------> 100.00%
Checksum <-----------------------------------------------------------------------------------------------------------------------------> 100.00%
[2024/11/18 17:10:06.026 +08:00] [INFO] [collector.go:77] ["Database Backup failed summary"] [total-ranges=6] [ranges-succeed=6] [ranges-failed=0] [backup-checksum=46.146682ms] [backup-fast-checksum=9.151047ms] [backup-total-regions=42] [backup-total-ranges=42]
Error: [BR:Backup:ErrBackupChecksumMismatch]backup checksum mismatch

1. Minimal reproduce step (Required)

  1. create table with global index
  2. insert 1 row into table
  3. backup full/db table

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

checksum successfully

3. What did you see instead (Required)

[2024/11/18 17:10:06.026 +08:00] [INFO] [collector.go:77] ["Database Backup failed summary"] [total-ranges=6] [ranges-succeed=6] [ranges-failed=0] [backup-checksum=46.146682ms] [backup-fast-checksum=9.151047ms] [backup-total-regions=42] [backup-total-ranges=42]
Error: [BR:Backup:ErrBackupChecksumMismatch]backup checksum mismatch

img_v3_02go_0a798a00-a993-4843-99c2-2b024e1c701g

4. What is your TiDB version? (Required)

cluster :v8.4.0
br :v8.4.0
command
tiup br:v8.4.0 backup db --db="xxxx" --pd "pd-peer:2379" --storage "s3://xxxx/xxxx" --send-credentials-to-tikv=true --s3.endpoint=http://xxx.xxx.xxx:xxx/ --ratelimit 256 --log-file /tiup/backuptable.log

@shaoxiqian shaoxiqian added the type/bug The issue is confirmed as a bug. label Nov 18, 2024
@shaoxiqian shaoxiqian changed the title 【BR】Backing up tables with global indexes will miss the global indexes, resulting in inconsistent checksums 【BR】Backing up tables with global indexes will miss the global indexes, resulting in inconsistent checksum Nov 18, 2024
@BornChanger BornChanger assigned mjonss and unassigned YuJuncen Nov 18, 2024
@BornChanger
Copy link
Contributor

BuildTableRanges() call appendRanges(), but it does not take global index into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.3 affects-8.4 affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants