learning_tla/lamport_video/docs/lecture05.md
2025-02-08 18:44:33 +01:00

1.2 KiB

Transaction commit

Transition diagram for each wedding participant, bride and groom:

flowchart
    unsure --> prepared
    unsure --> aborted
    prepared --> committed
    prepared --> aborted
  • In databases, a transaction is performed by a collection of resource managers.
  • Transactions can commit or abort.
  • They can only commit if all RMs are prepared to commit.
  • They must abort if any RM wants to abort
flowchart
    working --> prepared
    working --> aborted
    prepared --> committed
    prepared --> aborted
Programming Math
Array Function
Index set Domain
f[e] array application f(e) function application
Programs Formulas

BUT TLA+ uses [] for function application, not (), to avoid confusion with other uses of parentheses.

Always be suspicious of success.

  • When running a spec, a "Count" of 0 usually means an error in the spec.
  • Check the invariance of conditions that should be invariant.