-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
truncate table with many partitions with tiflash replica may encounter write conflict and retry #42940
Comments
This is because we alloc new partition id when ddl job is running in a txn: Lines 3324 to 3337 in 8eb580e
We also alloc job id using the same increase key, so if there are too many ddl jobs, the conflict probability increases. The reason why is are so many ddl jobs is because the tiflash will send ddl request "update tiflash replica status" to update tiflash meta for each partition after truncate table, so when partition is too many, there will be a lot of jobs. |
Yeah...make sense But this is not about correctness, am I right? |
Yes, it is not about correctness but only performance related |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
Some times you can see some error in log
Because of write conflict, the ddl job retries and user should wait more time for ddl finish
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: