-
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
The update ignore
may still report dup-key error when retry
#54489
Comments
I'll explain how it happens. The table
Then session 1 trys to update this with
Because it is not in an explicit transaction, TiDB will try to use optimistic txn mode to update this row. It will succeed when updating row 1 in memory because there is no conflict. Then another session, session2 inserts a new row Lines 3891 to 3893 in 08147e7
It will cause tidb/pkg/table/tables/tables.go Lines 579 to 589 in 08147e7
That sets |
So I understand a bit about the background now. However, the |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
This unit test fails
2. What did you expect to see? (Required)
The test should pass.
3. What did you see instead (Required)
The test fails with error:
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: