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

checksum mismatch when restored backup with checksum v2 and table id changes #11713

Closed
fubinzh opened this issue Nov 4, 2024 · 4 comments · Fixed by #11720
Closed

checksum mismatch when restored backup with checksum v2 and table id changes #11713

fubinzh opened this issue Nov 4, 2024 · 4 comments · Fixed by #11720
Assignees
Labels
affects-8.4 affects-8.5 This bug affects the 8.5.x(LTS) versions. area/ticdc Issues or PRs related to TiCDC. severity/critical type/bug The issue is confirmed as a bug.

Comments

@fubinzh
Copy link

fubinzh commented Nov 4, 2024

What did you do?

  1. create testbed, upstream tidb with ticdc, downstream tidb, kafka cluster
  2. run same backup with 32 data tables and 32 index tables to upstream and downstreasm tidb
  3. enable rowchecksum on upstream and downstream tidb (set global tidb_enable_row_level_checksum=true)
  4. Create kafka simple protocol changefeed
  5. run consumer to consumer kafka message to downstream tidb
  6. Run workload, workloads contains:
    1): insert and update
    2): add column/index for index table, by: creating index_v2 table with new column/index, copy data from index to index_v2, drop index table, rename index_v2 to index
  7. stop workload, wait all data sync to downstream tidb, and do upstream and downstream data consistency check => pass
  8. clean the environment. (drop the database from upstream and downstream tidb, delete changefeed, stop consumer.)
  9. repeat the testing, restore the backup, create changefeed again, and run workload, this time only run insert and update workload. (add column/index workload not execute.)

What did you expect to see?

after step 9, cdc changefeed not run into checksum mismatch error.

What did you see instead?

CDC changefeed run into checksum mismatch error:

[2024/11/04 16:25:40.795 +08:00] [ERROR] [mounter.go:642] ["raw bytes checksum mismatch"] [expected=1621378861] [obtained=400491149] [tableInfo="TableInfo, ID: 1853, Name:uxx2.Data9, ColNum: 4, IdxNum: 0, PKIsHa
ndle: true"] [columns="[{\"column_id\":1,\"value\":1459507293},{\"column_id\":2,\"value\":45415},{\"column_id\":3,\"value\":\"dnV6YWd0eWJnemh1cXZ6YnZmYnR2ZXdhZ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Hdhbm5lY2h4ZGJ3bHhjbHN4c2p0empyaHZhYnN3b2lzdXpscnZmdGd0anhmbGZ2ZHNsaWpkdnloaGlwZ2VoZGJhY2FsbGtneHdqdWVvZ214d25panZhZGdqbWh0ZXhxZHNxbWdleG15d2lreG9ydm5qdmxsZmtkZmtua2pzenNoY3J0YXZxcHlyb21kc3libW
Zma3FicXdmd3FqZnluY3RlZW5uZ3hkYXphYWhlY2tra2g=\"},{\"column_id\":4,\"value\":1351208411}]"] [key=74800000000000073d5f72800000000000b167] [tz=Asia/Shanghai]

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client): v8.4.0

(# /tidb-server -V
Release Version: v8.4.0
Edition: Community
Git Commit Hash: 7e87622511efa3113cbd771600d4272fecad79a9

Upstream TiKV version (execute tikv-server --version): v8.4.0

TiKV 
Release Version:   8.4.0-alpha
Edition:           Community
Git Commit Hash:   1cc62578757f50dddc32a8ae089414091b6d3be7

TiCDC version (execute cdc version): v8.4.0

Release Version: v8.4.0-pr11712
Git Commit Hash: 3c954ff9325d7ea9c0bb9169a95f681e7162653f
@fubinzh fubinzh added area/ticdc Issues or PRs related to TiCDC. type/bug The issue is confirmed as a bug. labels Nov 4, 2024
@fubinzh fubinzh changed the title checksum mismatch checksum mismatch when running workload Nov 4, 2024
@fubinzh
Copy link
Author

fubinzh commented Nov 4, 2024

/severity critical

@fubinzh
Copy link
Author

fubinzh commented Nov 4, 2024

/label affects-8.4

Copy link
Contributor

ti-chi-bot bot commented Nov 4, 2024

@fubinzh: The label(s) affects-8.4 cannot be applied, because the repository doesn't have them.

In response to this:

/label affects-8.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@fubinzh
Copy link
Author

fubinzh commented Nov 4, 2024

/assign @3AceShowHand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.4 affects-8.5 This bug affects the 8.5.x(LTS) versions. area/ticdc Issues or PRs related to TiCDC. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants