Skip to content

Transaction specs may be not as solid as expected #28

Description

@sticnarf

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:

eraseLock(key, l) == 
        IF l \in key_lock[key]
        THEN
            /\ key_data' = [key_data EXCEPT ![key] = @ \ {[ts |-> l.ts]}]
            /\ key_lock' = [key_lock EXCEPT ![key] = @ \ {l}]
            /\ key_write' = [key_write EXCEPT ![key] =
                         Append(@, [ts |-> l.ts, type |-> "rollback"])]
        ELSE
            UNCHANGED <<key_data, key_lock, key_write>>

This demonstrates the wrong implementation in tikv/tikv#5390. However, the tests still pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions