You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to reproduce the bug which is fixed by tikv/tikv#5673. The bug is introduced by the new check_txn_status API, which is a cleanup API substitution. We forgot to write rollback when there is no lock.
To reproduce the problem in TLA+, I change the eraseLock in CollapseRollbacks by:
rollback(k,ts)==IFkey_lock[k]#{}THEN\* If the existing lock has the same ts, unlock it./\IF\El\inkey_lock[k]:l.ts=tsTHENkey_lock'=[key_lockEXCEPT![k] = {}]ELSEUNCHANGEDkey_lock/\key_data'=[key_dataEXCEPT![k] = @\{[ts|->ts]}]\* Write a rollback in the write column./\key_write'=[key_writeEXCEPT![k] = (@\{w\inlatestHistoryWrite(k,ts):w.type="rollback"})\* collapse rollback\union{[ts|->ts,type|->"rollback",start_ts|->ts]}]ELSEUNCHANGED<<key_lock,key_data,key_write>>
It's quite easy to get Invariant CommittedTxnConsistency is violated.
I try to reproduce the bug which is fixed by tikv/tikv#5673. The bug is introduced by the new check_txn_status API, which is a cleanup API substitution. We forgot to write rollback when there is no lock.
To reproduce the problem in TLA+, I change the eraseLock in
CollapseRollbacks
by:This demonstrates the wrong implementation in tikv/tikv#5390. However, the tests still pass.
The text was updated successfully, but these errors were encountered: