A transaction is a set of operations that should happen atomically. Exactly which operations that may include is up for discussion, but think reads, writes, deletes, and possibly index lookups for now.

Contents:

Client-Side Transactions

  1. Client reads A, B, C
  2. Client reserves txid
  3. Client writes A, B, C with lien to txid for some time (how long? see below)
  4. Client writes T with (A', B', C') at txid
  5. Client writes A' into A, B' into B, C' into C
  6. Client deletes T

Consequences

Server-Side Transactions (2PC)

  1. Client sends MT ("minitransaction") to master
  2. Master writes transaction object with list of participants, acquiring a txid
  3. Master sends txid, MT to all participants
  4. Participants lock objects and log MT
  5. Participants send vote to master
  6. If the decision is yes, the master notes it in the transaction object
  7. Master relays decision to participants
  8. Master sends response to client
  9. If the decision is yes, the participants commit. Otherwise, they unlock/roll back.
  10. Participants sends commit acknowledgement to master
  11. Master removes transaction object

Failure Scenarios