Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Server-Side Transactions (2PC)

  1. Client sends MT ("minitransaction") to master
    • predicates: list of (table id, oid, version) predicates
    • writes, creates (server-assigned keys?), deletes
    • reads
      • If the transaction commits, the object must have the given version at the time the decision is made. If the object has some other operation applied to it below, it must additionally not be modified until the operation is applied.
    • writes: list of (table id, oid, data, indexes)
      • If the transaction commits, the data and index entries will be stored in the object.
    • creates (with server-assigned keys): list of (table, data, indexes)
      • If the transaction commits, the data and index entries will be stored in a new object.
        • How will the client get to know which object this is? Either the master will have to delay returning the outcome to the client or the participant will have to allocate the ID before the decision to commit is made.
    • deletes: list of (table id, oid)
      • If the transaction commits, the object will be deleted.
    • reads: list of (table id, oid)
      • If the transaction commits, the data and index entries will be returned.
      • Doing reads outside the transaction and then sending a transaction consisting of predicates for the versions that were read is the optimistic alternative to this. Do we want to support pessimistic reads inside transactions?
  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
  6. Master writes decision in table
  7. Master relays decision to participants
  8. Master relays to client
  9. Participants commit
  10. Participants acknowledge
  11. Master removes transaction object