[br] checksum mismatch (actual: 0) during restore due to old table id is not deleted
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
1. br restore tpcc to the cluster success
2. create new database tpcc_01 and rename table to new database
3. br restore and stop it during restoring
4. delete tpcc db
5. br restore tpcc again
### 2. What did you expect to see? (Required)
A new table ID needs to be assigned to the new job
### 3. What did you see instead (Required)
[root@autotest ~]# tiup br:v8.5.6 restore db --pd "127.0.0.1:2379" --storage "s3://benchmark/tpcc-1000-4.0" --s3.endpoint "http://minio.pingcap.net:9000" --send-credentials-to-tikv=true --check-requirements=false --db tpcc
Starting component br: /root/.tiup/components/br/v8.5.6/br restore db --pd 127.0.0.1:2379 --storage s3://benchmark/tpcc-1000-4.0 --s3.endpoint http://minio.pingcap.net:9000 --send-credentials-to-tikv=true --check-requirements=false --db tpcc
Detail BR log in /tmp/br.log.2026-05-30T15.45.33+0800
Split&Scatter Regions <------------------------------------------------> 100.00%
Download&Ingest SST <\...................................................> 0.44%{"level":"warn","ts":"2026-05-30T15:51:09.358172+0800","logger":"etcd-client","caller":"v3@v3.5.15/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc001008000/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = context deadline exceeded"}
...
Download&Ingest SST <--------------------------------------------------> 100.00%
Restore Pipeline <-----------------------------------------------------> 100.00%
[2026/05/30 16:01:13.607 +08:00] [INFO] [collector.go:77] ["DataBase Restore failed summary"] [total-ranges=2271] [ranges-succeed=2271] [ranges-failed=0] [merge-ranges=15.599274ms] [split-regions=8.483997ms] [restore-files=10m34.902588795s] [restore-pipeline=2.153327ms] [default-CF-files=633] [write-CF-files=1715] [split-keys=713]
Error: checksum mismatch for table 'tpcc.item' (ID: 198): crc64xor (expected: 15603970303312513296, actual: 0), totalKvs (expected: 100000, actual: 0), totalBytes (expected: 10103337, actual: 0): [BR:Restore:ErrRestoreChecksumMismatch]restore checksum mismatch
### 4. What is your TiDB version? (Required)
v8.5.6
Contributor guide
Assessment
This issue has not been assessed yet.