Async commit can mistakenly return success, while it's actually rolled back #33641
Labels
affects-5.0
This bug affects 5.0.x versions.
affects-5.1
This bug affects 5.1.x versions.
affects-5.2
This bug affects 5.2.x versions.
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.0
severity/major
sig/transaction
SIG:Transaction
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
It's a bit hard to reproduce.
First, use a modified client-go and set its maxCommitTs to be 40s.
Then run the test with failpoint. pd-ctl and tikv-ctl are needed.
https://gist.github.com/ekexium/5152b02ba7a1a63290c1c7539a7d047f
2. What did you expect to see? (Required)
Results of commit statements reflect their real status.
3. What did you see instead (Required)
Both transactions return commit success to the client.
While from the logs and MVCC records we can see the pessimistic transaction is rolled back, and it failed in its commit phase.
Locked keys (the row key, in this example) were rolled back, while non-unique index keys commit succeeded. It breaks atomicity and may risk data-index consistency.
4. What is your TiDB version? (Required)
master.
The text was updated successfully, but these errors were encountered: