Corresponding module’s Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
Corresponding module logs (including logs from 1 hour before and after the issue)
If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.
The version you are using here is v5.2.2. There was a bug with alter table modify column before this version, which could cause data corruption:
This PR was merged on April 12, 2022. You can check the date of your version:
[bin]$ ./tidb-server -V
If the date is earlier than April 12, then congratulations, you are likely encountering this bug.
The trigger condition for this bug is concurrent execution of alter table modify column. You can check if DDL has been executed repeatedly (concurrently) with the following command:
mysql> admin show ddl jobs;
If it has, then it confirms the issue.
For the trigger conditions of the bug, you can refer to:
Thank you!
There should also be version 5.0. After we modified it before, the downstream couldn’t synchronize, so we had to clear everything and perform a full synchronization again, then use drainer for incremental synchronization.